unix: fix segmentation fault on linking FreeDOS build with DJGPP #2644
Conversation
| @@ -32,13 +32,9 @@ | |||
| #define MICROPY_STREAMS_NON_BLOCK (0) | |||
|
|
|||
| #undef MICROPY_PY_SYS_PLATFORM | |||
| #define MICROPY_PY_SYS_PLATFORM "freedos" | |||
| #define MICROPY_PY_SYS_PLATFORM "FreeDOS" | |||
dpgeorge
Dec 2, 2016
Member
The sys.platform string is traditionally all lower case.
The sys.platform string is traditionally all lower case.
| @@ -34,6 +34,9 @@ MICROPY_SSL_MBEDTLS = 0 | |||
| # jni module requires JVM/JNI | |||
| MICROPY_PY_JNI = 0 | |||
|
|
|||
| # FatFS VFS support | |||
| MICROPY_PY_FATFS = 1 | |||
dpgeorge
Dec 2, 2016
Member
There is already MICROPY_FATFS variable for this.
There is already MICROPY_FATFS variable for this.
| @@ -103,6 +103,9 @@ ifeq ($(MICROPY_PY_THREAD),1) | |||
| CFLAGS_MOD += -DMICROPY_PY_THREAD=1 -DMICROPY_PY_THREAD_GIL=0 | |||
| LDFLAGS_MOD += -lpthread | |||
| endif | |||
| ifeq ($(MICROPY_PY_FATFS),1) | |||
dpgeorge
Dec 2, 2016
Member
Please use MICROPY_FATFS.
Please use MICROPY_FATFS.
|
The commit message makes it look like using non-internal errno what caused segfaults, or something. Building MicroPython with --gc-sections is now actually a requirement, i.e. building without it may break at any time (even if it works for a particular configuration now). So, please add a comment straight at the Makefile, explaining why it's needed, and referencing an upstream bug report on that, so everyone could check when this workaround can be removed. |
|
Ok, the problem was with djgpp. New version of binutils (2.27) solve the problem. Discussion: Internal errors are used since there is one more error ( |
| @@ -156,11 +156,13 @@ LIB_SRC_C = $(addprefix lib/,\ | |||
| timeutils/timeutils.c \ | |||
| ) | |||
|
|
|||
| ifeq ($(MICROPY_VFS_FAT), 1) | |||
dpgeorge
Feb 2, 2017
Member
Are you sure this ifeq is needed? The VFS stuff is disabled by default (eg not included in standard unix build).
Are you sure this ifeq is needed? The VFS stuff is disabled by default (eg not included in standard unix build).
| MICROPY_PY_BTREE=0 \ | ||
| MICROPY_VFS_FAT=0 \ | ||
| MICROPY_FSUSERMOUNT=0 \ | ||
| MICROPY_FATFS=0 |
dpgeorge
Feb 2, 2017
Member
FSUSERMOUNT and FATFS options are no longer needed. VFS_FAT also shouldn't be needed (it's disabled by default).
FSUSERMOUNT and FATFS options are no longer needed. VFS_FAT also shouldn't be needed (it's disabled by default).
|
@dpgeorge, thanks. Now it looks much cleaner. |
|
Thanks, merged in 5bea6ea. |
…vice Disable BLE file service for now
fatfsmodule optional--no-gc-sectionstoLDFLAGS_EXTRAOriginal commit by @prusnak (prusnak@a97e088)