diff options
author | das <das@noemail.net> | 2007-08-07 05:06:37 (GMT) |
---|---|---|
committer | das <das@noemail.net> | 2007-08-07 05:06:37 (GMT) |
commit | 83c922f36bcd6795d3c09e1f43eeed910cf79992 (patch) | |
tree | 8cd95e02cd19a8b4dbbba9316950da91f8d951b8 /unix | |
parent | 3b072ce440bebb14cac3471082aeaabbdf545542 (diff) | |
download | tcl-83c922f36bcd6795d3c09e1f43eeed910cf79992.zip tcl-83c922f36bcd6795d3c09e1f43eeed910cf79992.tar.gz tcl-83c922f36bcd6795d3c09e1f43eeed910cf79992.tar.bz2 |
* unix/Makefile.in: add support for compile flags specific to
object files linked directly into executables.
* unix/configure.in (Darwin): only use -seg1addr flag when prebinding;
use -mdynamic-no-pic flag for object files linked directly into exes;
support overriding TCL_PACKAGE_PATH in environment.
* unix/configure: autoconf-2.13
FossilOrigin-Name: 3002cbfa501fc0b0f9a10180df7adc5ddea46956
Diffstat (limited to 'unix')
-rw-r--r-- | unix/Makefile.in | 37 | ||||
-rwxr-xr-x | unix/configure | 13 | ||||
-rw-r--r-- | unix/configure.in | 14 |
3 files changed, 35 insertions, 29 deletions
diff --git a/unix/Makefile.in b/unix/Makefile.in index 3ecdd33..895b503 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -5,7 +5,7 @@ # "autoconf" program (constructs like "@foo@" will get replaced in the # actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.121.2.21 2007/06/06 09:54:33 das Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.121.2.22 2007/08/07 05:06:41 das Exp $ VERSION = @TCL_VERSION@ MAJOR_VERSION = @TCL_MAJOR_VERSION@ @@ -288,17 +288,14 @@ DDD = ddd # either. #---------------------------------------------------------------- - -CC_SWITCHES = ${CFLAGS} ${CFLAGS_WARNING} ${SHLIB_CFLAGS} \ --I${GENERIC_DIR} -I${SRC_DIR} \ -${AC_FLAGS} ${MATH_FLAGS} ${GENERIC_FLAGS} ${PROTO_FLAGS} ${MEM_DEBUG_FLAGS} \ -${COMPILE_DEBUG_FLAGS} ${NO_DEPRECATED_FLAGS} ${ENV_FLAGS} \ +STUB_CC_SWITCHES = ${CFLAGS} ${CFLAGS_WARNING} ${SHLIB_CFLAGS} \ +-I${GENERIC_DIR} -I${SRC_DIR} ${AC_FLAGS} ${MATH_FLAGS} ${GENERIC_FLAGS} \ +${PROTO_FLAGS} ${MEM_DEBUG_FLAGS} ${COMPILE_DEBUG_FLAGS} ${ENV_FLAGS} \ -DTCL_SHLIB_EXT=\"${SHLIB_SUFFIX}\" @EXTRA_CC_SWITCHES@ -STUB_CC_SWITCHES = ${CFLAGS} ${CFLAGS_WARNING} ${SHLIB_CFLAGS} \ --I${GENERIC_DIR} -I${SRC_DIR} \ -${AC_FLAGS} ${MATH_FLAGS} ${GENERIC_FLAGS} ${PROTO_FLAGS} ${MEM_DEBUG_FLAGS} \ -${COMPILE_DEBUG_FLAGS} ${ENV_FLAGS} -DTCL_SHLIB_EXT=\"${SHLIB_SUFFIX}\" @EXTRA_CC_SWITCHES@ +CC_SWITCHES = $(STUB_CC_SWITCHES) ${NO_DEPRECATED_FLAGS} + +APP_CC_SWITCHES = $(CC_SWITCHES) @EXTRA_APP_CC_SWITCHES@ LIBS = @DL_LIBS@ @LIBS@ $(MATH_LIBS) @@ -790,7 +787,7 @@ tclTestInit.o: $(UNIX_DIR)/tclAppInit.c tclsh rm -f tclAppInit.sav; \ mv tclAppInit.o tclAppInit.sav; \ fi; - $(CC) -c $(CC_SWITCHES) \ + $(CC) -c $(APP_CC_SWITCHES) \ -DTCL_BUILDTIME_LIBRARY="\"${TCL_BUILDTIME_LIBRARY}\"" \ -DTCL_TEST $(UNIX_DIR)/tclAppInit.c rm -f tclTestInit.o @@ -804,7 +801,7 @@ xtTestInit.o: $(UNIX_DIR)/tclAppInit.c tclsh rm -f tclAppInit.sav; \ mv tclAppInit.o tclAppInit.sav; \ fi; - $(CC) -c $(CC_SWITCHES) \ + $(CC) -c $(APP_CC_SWITCHES) \ -DTCL_BUILDTIME_LIBRARY="\"${TCL_BUILDTIME_LIBRARY}\"" \ -DTCL_TEST -DTCL_XT_TEST $(UNIX_DIR)/tclAppInit.c rm -f xtTestInit.o @@ -832,7 +829,7 @@ regerror.o: $(REGHDRS) $(GENERIC_DIR)/regerrs.h $(GENERIC_DIR)/regerror.c $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/regerror.c tclAppInit.o: $(UNIX_DIR)/tclAppInit.c - $(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/tclAppInit.c + $(CC) -c $(APP_CC_SWITCHES) $(UNIX_DIR)/tclAppInit.c # On unix we want to use the normal malloc/free implementation, so we # specifically set the USE_TCLALLOC flag. @@ -1027,13 +1024,13 @@ tclVar.o: $(GENERIC_DIR)/tclVar.c $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclVar.c tclTest.o: $(GENERIC_DIR)/tclTest.c - $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclTest.c + $(CC) -c $(APP_CC_SWITCHES) $(GENERIC_DIR)/tclTest.c tclTestObj.o: $(GENERIC_DIR)/tclTestObj.c - $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclTestObj.c + $(CC) -c $(APP_CC_SWITCHES) $(GENERIC_DIR)/tclTestObj.c tclTestProcBodyObj.o: $(GENERIC_DIR)/tclTestProcBodyObj.c - $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclTestProcBodyObj.c + $(CC) -c $(APP_CC_SWITCHES) $(GENERIC_DIR)/tclTestProcBodyObj.c tclTimer.o: $(GENERIC_DIR)/tclTimer.c $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclTimer.c @@ -1048,7 +1045,7 @@ tclThreadJoin.o: $(GENERIC_DIR)/tclThreadJoin.c $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclThreadJoin.c tclThreadTest.o: $(GENERIC_DIR)/tclThreadTest.c - $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclThreadTest.c + $(CC) -c $(APP_CC_SWITCHES) $(GENERIC_DIR)/tclThreadTest.c tclUnixChan.o: $(UNIX_DIR)/tclUnixChan.c $(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/tclUnixChan.c @@ -1072,7 +1069,7 @@ tclUnixSock.o: $(UNIX_DIR)/tclUnixSock.c $(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/tclUnixSock.c tclUnixTest.o: $(UNIX_DIR)/tclUnixTest.c - $(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/tclUnixTest.c + $(CC) -c $(APP_CC_SWITCHES) $(UNIX_DIR)/tclUnixTest.c tclUnixThrd.o: $(UNIX_DIR)/tclUnixThrd.c $(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/tclUnixThrd.c @@ -1106,11 +1103,11 @@ xttest: ${XTTEST_OBJS} ${GENERIC_OBJS} ${UNIX_OBJS} ${COMPAT_OBJS} \ ${CC_SEARCH_FLAGS} -L/usr/openwin/lib -lXt -o xttest tclXtNotify.o: $(UNIX_DIR)/tclXtNotify.c - $(CC) -c $(CC_SWITCHES) -I/usr/openwin/include \ + $(CC) -c $(APP_CC_SWITCHES) -I/usr/openwin/include \ $(UNIX_DIR)/tclXtNotify.c tclXtTest.o: $(UNIX_DIR)/tclXtTest.c - $(CC) -c $(CC_SWITCHES) -I/usr/openwin/include \ + $(CC) -c $(APP_CC_SWITCHES) -I/usr/openwin/include \ $(UNIX_DIR)/tclXtTest.c # compat binaries, these must be compiled for use in a shared library diff --git a/unix/configure b/unix/configure index d1d646c..742f051 100755 --- a/unix/configure +++ b/unix/configure @@ -9088,10 +9088,12 @@ fi fi TCL_SHLIB_LD_EXTRAS="-compatibility_version ${TCL_VERSION} -current_version ${TCL_VERSION}`echo ${TCL_PATCH_LEVEL} | awk '{match($0, "\\\.[0-9]+"); print substr($0,RSTART,RLENGTH)}'`" - TCL_SHLIB_LD_EXTRAS="${TCL_SHLIB_LD_EXTRAS}"' -install_name ${DYLIB_INSTALL_DIR}/${TCL_LIB_FILE} -seg1addr 0xa000000' + TCL_SHLIB_LD_EXTRAS="${TCL_SHLIB_LD_EXTRAS}"' -install_name ${DYLIB_INSTALL_DIR}/${TCL_LIB_FILE}' + echo "$LDFLAGS " | grep -q -- '-prebind ' && TCL_SHLIB_LD_EXTRAS="${TCL_SHLIB_LD_EXTRAS}"' -seg1addr 0xa000000' TCL_SHLIB_LD_EXTRAS="${TCL_SHLIB_LD_EXTRAS}"' -sectcreate __TEXT __info_plist Tcl-Info.plist' EXTRA_TCLSH_LIBS='-sectcreate __TEXT __info_plist Tclsh-Info.plist' tcl_config_files="${tcl_config_files} Tcl-Info.plist:../macosx/Tcl-Info.plist.in Tclsh-Info.plist:../macosx/Tclsh-Info.plist.in" + EXTRA_APP_CC_SWITCHES='-mdynamic-no-pic' fi if test "$FRAMEWORK_BUILD" = "1" ; then @@ -9168,11 +9170,12 @@ VERSION=${TCL_VERSION} #-------------------------------------------------------------------- if test "$FRAMEWORK_BUILD" = "1" ; then - TCL_PACKAGE_PATH="~/Library/Tcl /Library/Tcl /Network/Library/Tcl /System/Library/Tcl ~/Library/Frameworks /Library/Frameworks /Network/Library/Frameworks /System/Library/Frameworks" + test -z "$TCL_PACKAGE_PATH" && \ + TCL_PACKAGE_PATH="~/Library/Tcl /Library/Tcl /Network/Library/Tcl /System/Library/Tcl ~/Library/Frameworks /Library/Frameworks /Network/Library/Frameworks /System/Library/Frameworks" elif test "$prefix" != "$exec_prefix"; then - TCL_PACKAGE_PATH="${libdir} ${prefix}/lib" + TCL_PACKAGE_PATH="${libdir} ${prefix}/lib ${TCL_PACKAGE_PATH}" else - TCL_PACKAGE_PATH="${prefix}/lib" + TCL_PACKAGE_PATH="${prefix}/lib ${TCL_PACKAGE_PATH}" fi #-------------------------------------------------------------------- @@ -9256,6 +9259,7 @@ TCL_SHARED_BUILD=${SHARED_BUILD} + CFLAGS="${CFLAGS} ${CPPFLAGS}"; CPPFLAGS="" @@ -9473,6 +9477,7 @@ s%@TCL_LIBRARY@%$TCL_LIBRARY%g s%@PRIVATE_INCLUDE_DIR@%$PRIVATE_INCLUDE_DIR%g s%@HTML_DIR@%$HTML_DIR%g s%@EXTRA_CC_SWITCHES@%$EXTRA_CC_SWITCHES%g +s%@EXTRA_APP_CC_SWITCHES@%$EXTRA_APP_CC_SWITCHES%g s%@EXTRA_INSTALL@%$EXTRA_INSTALL%g s%@EXTRA_INSTALL_BINARIES@%$EXTRA_INSTALL_BINARIES%g s%@EXTRA_BUILD_HTML@%$EXTRA_BUILD_HTML%g diff --git a/unix/configure.in b/unix/configure.in index a995914..9c158e9 100644 --- a/unix/configure.in +++ b/unix/configure.in @@ -3,7 +3,7 @@ dnl This file is an input file used by the GNU "autoconf" program to dnl generate the file "configure", which is run during Tcl installation dnl to configure the system for the local environment. # -# RCS: @(#) $Id: configure.in,v 1.106.2.37 2007/06/06 09:54:35 das Exp $ +# RCS: @(#) $Id: configure.in,v 1.106.2.38 2007/08/07 05:06:44 das Exp $ AC_INIT(../generic/tcl.h) AC_PREREQ(2.13) @@ -557,10 +557,12 @@ HTML_DIR='$(DISTDIR)/html' if test "`uname -s`" = "Darwin" ; then SC_ENABLE_FRAMEWORK TCL_SHLIB_LD_EXTRAS="-compatibility_version ${TCL_VERSION} -current_version ${TCL_VERSION}`echo ${TCL_PATCH_LEVEL} | awk ['{match($0, "\\\.[0-9]+"); print substr($0,RSTART,RLENGTH)}']`" - TCL_SHLIB_LD_EXTRAS="${TCL_SHLIB_LD_EXTRAS}"' -install_name ${DYLIB_INSTALL_DIR}/${TCL_LIB_FILE} -seg1addr 0xa000000' + TCL_SHLIB_LD_EXTRAS="${TCL_SHLIB_LD_EXTRAS}"' -install_name ${DYLIB_INSTALL_DIR}/${TCL_LIB_FILE}' + echo "$LDFLAGS " | grep -q -- '-prebind ' && TCL_SHLIB_LD_EXTRAS="${TCL_SHLIB_LD_EXTRAS}"' -seg1addr 0xa000000' TCL_SHLIB_LD_EXTRAS="${TCL_SHLIB_LD_EXTRAS}"' -sectcreate __TEXT __info_plist Tcl-Info.plist' EXTRA_TCLSH_LIBS='-sectcreate __TEXT __info_plist Tclsh-Info.plist' tcl_config_files="${tcl_config_files} [Tcl-Info.plist:../macosx/Tcl-Info.plist.in Tclsh-Info.plist:../macosx/Tclsh-Info.plist.in]" + EXTRA_APP_CC_SWITCHES='-mdynamic-no-pic' fi if test "$FRAMEWORK_BUILD" = "1" ; then @@ -640,11 +642,12 @@ VERSION=${TCL_VERSION} #-------------------------------------------------------------------- if test "$FRAMEWORK_BUILD" = "1" ; then - TCL_PACKAGE_PATH="~/Library/Tcl /Library/Tcl /Network/Library/Tcl /System/Library/Tcl ~/Library/Frameworks /Library/Frameworks /Network/Library/Frameworks /System/Library/Frameworks" + test -z "$TCL_PACKAGE_PATH" && \ + TCL_PACKAGE_PATH="~/Library/Tcl /Library/Tcl /Network/Library/Tcl /System/Library/Tcl ~/Library/Frameworks /Library/Frameworks /Network/Library/Frameworks /System/Library/Frameworks" elif test "$prefix" != "$exec_prefix"; then - TCL_PACKAGE_PATH="${libdir} ${prefix}/lib" + TCL_PACKAGE_PATH="${libdir} ${prefix}/lib ${TCL_PACKAGE_PATH}" else - TCL_PACKAGE_PATH="${prefix}/lib" + TCL_PACKAGE_PATH="${prefix}/lib ${TCL_PACKAGE_PATH}" fi #-------------------------------------------------------------------- @@ -723,6 +726,7 @@ AC_SUBST(PRIVATE_INCLUDE_DIR) AC_SUBST(HTML_DIR) AC_SUBST(EXTRA_CC_SWITCHES) +AC_SUBST(EXTRA_APP_CC_SWITCHES) AC_SUBST(EXTRA_INSTALL) AC_SUBST(EXTRA_INSTALL_BINARIES) AC_SUBST(EXTRA_BUILD_HTML) |