diff --git a/Makefile b/Makefile index f932edc1..c2208794 100644 --- a/Makefile +++ b/Makefile @@ -93,7 +93,7 @@ NATIVE_DEFINES_$(CONFIG_BSD) += -DTARGETOS_$(TARGETOS) NATIVE_DEFINES_$(CONFIG_Android) += -DTARGETOS_ANDROID NATIVE_DEFINES_$(CONFIG_pie) += -DCONFIG_TCC_PIE NATIVE_DEFINES_$(CONFIG_pic) += -DCONFIG_TCC_PIC -NATIVE_DEFINES_$(CONFIG_new_macho) += -DCONFIG_NEW_MACHO +NATIVE_DEFINES_no_$(CONFIG_new_macho) += -DCONFIG_NEW_MACHO=0 NATIVE_DEFINES_$(CONFIG_codesign) += -DCONFIG_CODESIGN NATIVE_DEFINES_$(CONFIG_new-dtags) += -DCONFIG_NEW_DTAGS NATIVE_DEFINES_no_$(CONFIG_bcheck) += -DCONFIG_TCC_BCHECK=0 diff --git a/configure b/configure index bc0d3e5d..29277969 100755 --- a/configure +++ b/configure @@ -70,6 +70,7 @@ case $targetos in cc=`readlink $cc || echo clang` tcc_usrinclude="`xcrun --show-sdk-path`/usr/include" DLLSUF=".dylib" + dwarf=4 ;; Windows_NT|MINGW*|MSYS*|CYGWIN*) mingw32=yes @@ -350,7 +351,7 @@ Advanced options (experts only): --config-backtrace=no disable stack backtraces (with -run or -bt) --config-bcheck=no disable bounds checker (-b) --config-predefs=no do not compile tccdefs.h, instead just include - --config-new_macho Use apple new macho object format + --config-new_macho=no Use apple old macho object format --config-codesign Use codesign on apple to sign executables --dwarf=x Use dwarf debug info instead of stabs (x=2..5) EOF diff --git a/tcc.h b/tcc.h index 2c2e086b..144cc4bf 100644 --- a/tcc.h +++ b/tcc.h @@ -213,6 +213,12 @@ extern long double strtold (const char *__nptr, char **__endptr); # define CONFIG_TCC_BCHECK 1 /* enable bound checking code */ #endif +#if defined CONFIG_NEW_MACHO && CONFIG_NEW_MACHO==0 +# undef CONFIG_NEW_MACHO +#else +# define CONFIG_NEW_MACHO 1 /* enable new macho code */ +#endif + #if defined TARGETOS_OpenBSD \ || defined TARGETOS_FreeBSD \ || defined TARGETOS_NetBSD \