mirror of
https://github.com/gnustep/tools-make.git
synced 2025-04-23 22:33:28 +00:00
Get the compiler to ensure that we use thread-safe system calls and errno etc.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/tools/make/trunk@34001 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
c3269c12aa
commit
5c0b3d7846
2 changed files with 21 additions and 14 deletions
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
|||
2011-10-15 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* target.make: Use -pthread for compilation on all platforms.
|
||||
While it's not always needed, for the gcc-4.? series of compilers
|
||||
it should always work to turn on preprocessor defines and any other
|
||||
options needed for threaded code (and we have to assume all code we
|
||||
build may be used in a threaded environment).
|
||||
This gives gcc (or clang, which copies gcc) the responsibility for
|
||||
doing this work.
|
||||
|
||||
2011-09-29 Adam Fedor <fedor@gnu.org>
|
||||
|
||||
* Instance/Documentation/texi.make: Install html chapters as well
|
||||
|
|
25
target.make
25
target.make
|
@ -35,13 +35,17 @@ endif
|
|||
# Target specific libraries
|
||||
#
|
||||
TARGET_SYSTEM_LIBS = $(CONFIG_SYSTEM_LIBS) -lm
|
||||
|
||||
# All code we build needs to be thread-safe nowadays
|
||||
INTERNAL_CFLAGS = -pthread
|
||||
INTERNAL_OBJCFLAGS = -pthread
|
||||
INTERNAL_LDFLAGS = -pthread
|
||||
|
||||
ifneq ("$(objc_threaded)","")
|
||||
INTERNAL_CFLAGS = -D_REENTRANT
|
||||
INTERNAL_OBJCFLAGS = -D_REENTRANT
|
||||
AUXILIARY_OBJC_LIBS += $(objc_threaded)
|
||||
ifeq ($(shared), no)
|
||||
TARGET_SYSTEM_LIBS += $(objc_threaded)
|
||||
endif
|
||||
ifeq ($(shared), no)
|
||||
TARGET_SYSTEM_LIBS += $(objc_threaded)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(findstring mingw32, $(GNUSTEP_TARGET_OS)), mingw32)
|
||||
|
@ -158,7 +162,7 @@ AFTER_INSTALL_STATIC_LIB_CMD = \
|
|||
(cd $(LIB_LINK_INSTALL_DIR); \
|
||||
$(RANLIB) $(LIB_LINK_VERSION_FILE))
|
||||
SHARED_LIB_LINK_CMD =
|
||||
SHARED_CFLAGS =
|
||||
SHARED_CFLAGS = -pthread
|
||||
SHARED_LIBEXT =
|
||||
AFTER_INSTALL_SHARED_LIB_CMD = \
|
||||
(cd $(LIB_LINK_INSTALL_DIR); \
|
||||
|
@ -178,6 +182,7 @@ BUNDLE_LINK_CMD = $(BUNDLE_LD) $(BUNDLE_LDFLAGS) $(ALL_LDFLAGS) \
|
|||
#
|
||||
####################################################
|
||||
|
||||
|
||||
####################################################
|
||||
#
|
||||
# MacOSX-Server 1.0
|
||||
|
@ -660,14 +665,6 @@ BUNDLE_LDFLAGS += -shared
|
|||
ADDITIONAL_LDFLAGS += -rdynamic
|
||||
STATIC_LDFLAGS += -static
|
||||
|
||||
##
|
||||
## The -pthread flag must be passed to all compilation/link commands.
|
||||
##
|
||||
ifeq ($(objc_threaded), -pthread)
|
||||
INTERNAL_CFLAGS += -pthread
|
||||
INTERNAL_OBJCFLAGS += -pthread
|
||||
INTERNAL_LDFLAGS += -pthread
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
#
|
||||
|
|
Loading…
Reference in a new issue