Add workaround to target.make to pick up the right Objective-C runtime

headers when compiling plain C files with the GNU runtime on Darwin/OS X.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/tools/make/trunk@32838 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Wolfgang Lux 2011-04-12 09:32:40 +00:00
parent bce813fe47
commit 1b4a236839
2 changed files with 13 additions and 3 deletions

View file

@ -1,3 +1,9 @@
2011-04-12 Wolfgang Lux <wolfgang.lux@gmail.com>
* target.make: Add workaround to pick up the right Objective-C
runtime headers when compiling plain C files with the GNU runtime
on Darwin/OS X.
2011-04-11 Nicola Pero <nicola.pero@meta-innovation.com>
* objc.make: Print a deprecation warning if this file is used.

View file

@ -294,8 +294,12 @@ DYLIB_DEF_FRAMEWORKS += -framework Foundation
endif
ifeq ($(OBJC_RUNTIME_LIB), gnu)
# GNU compiler
# GNU runtime
# Make sure that compiler includes the right Objective-C runtime headers when
# compiling C source files. Normally, the required include path is implicitly
# added -fgnu-runtime, but this seems to be ignored when compiling C files.
INTERNAL_CFLAGS := -isystem $(shell $(CC) -print-search-dirs | sed -n '/install:/s/install: //p')include-gnu-runtime
INTERNAL_LDFLAGS += -undefined dynamic_lookup
SHARED_LD_PREFLAGS += -Wl,-noall_load -read_only_relocs warning $(CC_LDFLAGS)
@ -331,7 +335,7 @@ BUNDLE_LD = $(LD)
BUNDLE_LDFLAGS += -fgnu-runtime -bundle
else
# Apple Compiler
# Apple runtime
DYLIB_EXTRA_FLAGS = -undefined dynamic_lookup
# Useful optimization flag: -Wl,-single_module. This flag only
@ -942,7 +946,7 @@ SHARED_LIB_LINK_CMD = \
-Wl,--whole-archive $(OBJ_FILES_TO_LINK) $(ALL_LDFLAGS) \
-Wl,--no-whole-archive $(INTERNAL_LIBRARIES_DEPEND_UPON) $(TARGET_SYSTEM_LIBS)\
$(SHARED_LD_POSTFLAGS)
AFTER_INSTALL_SHARED_LIB_CMD =
AFTER_INSTALL_SHARED_LIB_CHOWN =
SHARED_LIBEXT = .dll.a