diff options
author | das <das> | 2007-08-07 05:07:48 (GMT) |
---|---|---|
committer | das <das> | 2007-08-07 05:07:48 (GMT) |
commit | dfacfc220f6b3a761c82e797e07939c48d64273c (patch) | |
tree | bfeb5cc4af78a2ae295e73e1fc915ae7be859da4 | |
parent | 06cbfb8e6af582eb4a59fee7868029b9d608bbe3 (diff) | |
download | tk-dfacfc220f6b3a761c82e797e07939c48d64273c.zip tk-dfacfc220f6b3a761c82e797e07939c48d64273c.tar.gz tk-dfacfc220f6b3a761c82e797e07939c48d64273c.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.
* unix/configure: autoconf-2.13
-rw-r--r-- | ChangeLog | 10 | ||||
-rw-r--r-- | unix/Makefile.in | 21 | ||||
-rwxr-xr-x | unix/configure | 6 | ||||
-rw-r--r-- | unix/configure.in | 7 |
4 files changed, 31 insertions, 13 deletions
@@ -1,3 +1,13 @@ +2007-08-07 Daniel Steffen <das@users.sourceforge.net> + + * 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. + + * unix/configure: autoconf-2.13 + 2007-07-25 Daniel Steffen <das@users.sourceforge.net> * macosx/tkMacOSXDialog.c (NavServicesGetFile): reset interp result on diff --git a/unix/Makefile.in b/unix/Makefile.in index 745bece..338ba81 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.87.2.20 2007/04/29 02:25:36 das Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.87.2.21 2007/08/07 05:07:49 das Exp $ # Current Tk version; used in various names. @@ -313,12 +313,13 @@ MAN_FLAGS = @MAN_FLAGS@ CC = @CC@ CC_SWITCHES_NO_STUBS = ${CFLAGS} ${CFLAGS_WARNING} ${SHLIB_CFLAGS} \ --I${UNIX_DIR} -I${GENERIC_DIR} \ --I${BMAP_DIR} -I${TCL_GENERIC_DIR} ${@TK_WINDOWINGSYSTEM@_INCLUDES} \ -${AC_FLAGS} ${PROTO_FLAGS} \ -${SECURITY_FLAGS} ${MEM_DEBUG_FLAGS} ${KEYSYM_FLAGS} ${NO_DEPRECATED_FLAGS} @EXTRA_CC_SWITCHES@ +-I${UNIX_DIR} -I${GENERIC_DIR} -I${BMAP_DIR} -I${TCL_GENERIC_DIR} \ +${@TK_WINDOWINGSYSTEM@_INCLUDES} ${AC_FLAGS} ${PROTO_FLAGS} ${SECURITY_FLAGS} \ +${MEM_DEBUG_FLAGS} ${KEYSYM_FLAGS} ${NO_DEPRECATED_FLAGS} @EXTRA_CC_SWITCHES@ -CC_SWITCHES = ${CC_SWITCHES_NO_STUBS} ${TCL_STUB_FLAGS} +CC_SWITCHES = $(CC_SWITCHES_NO_STUBS) ${TCL_STUB_FLAGS} + +APP_CC_SWITCHES = $(CC_SWITCHES_NO_STUBS) @EXTRA_APP_CC_SWITCHES@ DEPEND_SWITCHES = ${CFLAGS} -I${UNIX_DIR} -I${GENERIC_DIR} \ -I${BMAP_DIR} \ @@ -815,7 +816,7 @@ tkTestInit.o: $(UNIX_DIR)/tkAppInit.c wish rm -f tkAppInit.sav; \ mv tkAppInit.o tkAppInit.sav; \ fi; - $(CC) -c $(CC_SWITCHES_NO_STUBS) -DTK_TEST $(UNIX_DIR)/tkAppInit.c + $(CC) -c $(APP_CC_SWITCHES) -DTK_TEST $(UNIX_DIR)/tkAppInit.c rm -f tkTestInit.o mv tkAppInit.o tkTestInit.o @if test -f tkAppInit.sav ; then \ @@ -823,7 +824,7 @@ tkTestInit.o: $(UNIX_DIR)/tkAppInit.c wish fi; tkAppInit.o: $(UNIX_DIR)/tkAppInit.c - $(CC) -c $(CC_SWITCHES_NO_STUBS) $(UNIX_DIR)/tkAppInit.c + $(CC) -c $(APP_CC_SWITCHES) $(UNIX_DIR)/tkAppInit.c tk3d.o: $(GENERIC_DIR)/tk3d.c $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tk3d.c @@ -952,7 +953,7 @@ tkScrollbar.o: $(GENERIC_DIR)/tkScrollbar.c $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkScrollbar.c tkSquare.o: $(GENERIC_DIR)/tkSquare.c - $(CC) -c $(CC_SWITCHES_NO_STUBS) $(GENERIC_DIR)/tkSquare.c + $(CC) -c $(APP_CC_SWITCHES) $(GENERIC_DIR)/tkSquare.c tkCanvas.o: $(GENERIC_DIR)/tkCanvas.c $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkCanvas.c @@ -1006,7 +1007,7 @@ tkImgPhoto.o: $(GENERIC_DIR)/tkImgPhoto.c $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkImgPhoto.c tkTest.o: $(GENERIC_DIR)/tkTest.c - $(CC) -c $(CC_SWITCHES_NO_STUBS) $(GENERIC_DIR)/tkTest.c + $(CC) -c $(APP_CC_SWITCHES) $(GENERIC_DIR)/tkTest.c tkText.o: $(GENERIC_DIR)/tkText.c $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkText.c diff --git a/unix/configure b/unix/configure index f50923c..94b8bf0 100755 --- a/unix/configure +++ b/unix/configure @@ -5902,10 +5902,12 @@ fi fi TK_SHLIB_LD_EXTRAS="-compatibility_version ${TK_VERSION} -current_version ${TK_VERSION}`echo ${TK_PATCH_LEVEL} | awk '{match($0, "\\\.[0-9]+"); print substr($0,RSTART,RLENGTH)}'`" - TK_SHLIB_LD_EXTRAS="${TK_SHLIB_LD_EXTRAS}"' -install_name ${DYLIB_INSTALL_DIR}/${TK_LIB_FILE} -seg1addr 0xb000000 -unexported_symbols_list $$(f=$(TCL_STUB_LIB_FILE).E && nm -gjp $(TCL_BIN_DIR)/$(TCL_STUB_LIB_FILE) | grep ^_[^_] > $$f && echo $$f)' + TK_SHLIB_LD_EXTRAS="${TK_SHLIB_LD_EXTRAS}"' -install_name ${DYLIB_INSTALL_DIR}/${TK_LIB_FILE} -unexported_symbols_list $$(f=$(TCL_STUB_LIB_FILE).E && nm -gjp $(TCL_BIN_DIR)/$(TCL_STUB_LIB_FILE) | grep ^_[^_] > $$f && echo $$f)' + echo "$LDFLAGS " | grep -q -- '-prebind ' && TK_SHLIB_LD_EXTRAS="${TK_SHLIB_LD_EXTRAS}"' -seg1addr 0xb000000' TK_SHLIB_LD_EXTRAS="${TK_SHLIB_LD_EXTRAS}"' -sectcreate __TEXT __info_plist Tk-Info.plist' EXTRA_WISH_LIBS='-sectcreate __TEXT __info_plist Wish-Info.plist' tk_config_files="${tk_config_files} Tk-Info.plist:../macosx/Tk-Info.plist.in Wish-Info.plist:../macosx/Wish-Info.plist.in" + EXTRA_APP_CC_SWITCHES='-mdynamic-no-pic' fi if test "$FRAMEWORK_BUILD" = "1" ; then @@ -6069,6 +6071,7 @@ TK_SHARED_BUILD=${SHARED_BUILD} + CFLAGS="${CFLAGS} ${CPPFLAGS}"; CPPFLAGS="" @@ -6291,6 +6294,7 @@ s%@TK_LIBRARY@%$TK_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 56b5d82..8564ef5 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 Tk installation dnl to configure the system for the local environment. # -# RCS: @(#) $Id: configure.in,v 1.83.2.40 2007/06/06 09:56:22 das Exp $ +# RCS: @(#) $Id: configure.in,v 1.83.2.41 2007/08/07 05:07:49 das Exp $ AC_INIT(../generic/tk.h) AC_PREREQ(2.13) @@ -417,10 +417,12 @@ WISH_RSRC_FILE='wish$(VERSION).rsrc' if test "`uname -s`" = "Darwin" ; then SC_ENABLE_FRAMEWORK TK_SHLIB_LD_EXTRAS="-compatibility_version ${TK_VERSION} -current_version ${TK_VERSION}`echo ${TK_PATCH_LEVEL} | awk ['{match($0, "\\\.[0-9]+"); print substr($0,RSTART,RLENGTH)}']`" - TK_SHLIB_LD_EXTRAS="${TK_SHLIB_LD_EXTRAS}"' -install_name ${DYLIB_INSTALL_DIR}/${TK_LIB_FILE} -seg1addr 0xb000000 -unexported_symbols_list $$(f=$(TCL_STUB_LIB_FILE).E && nm -gjp $(TCL_BIN_DIR)/$(TCL_STUB_LIB_FILE) | grep ^_[[^_]] > $$f && echo $$f)' + TK_SHLIB_LD_EXTRAS="${TK_SHLIB_LD_EXTRAS}"' -install_name ${DYLIB_INSTALL_DIR}/${TK_LIB_FILE} -unexported_symbols_list $$(f=$(TCL_STUB_LIB_FILE).E && nm -gjp $(TCL_BIN_DIR)/$(TCL_STUB_LIB_FILE) | grep ^_[[^_]] > $$f && echo $$f)' + echo "$LDFLAGS " | grep -q -- '-prebind ' && TK_SHLIB_LD_EXTRAS="${TK_SHLIB_LD_EXTRAS}"' -seg1addr 0xb000000' TK_SHLIB_LD_EXTRAS="${TK_SHLIB_LD_EXTRAS}"' -sectcreate __TEXT __info_plist Tk-Info.plist' EXTRA_WISH_LIBS='-sectcreate __TEXT __info_plist Wish-Info.plist' tk_config_files="${tk_config_files} [Tk-Info.plist:../macosx/Tk-Info.plist.in Wish-Info.plist:../macosx/Wish-Info.plist.in]" + EXTRA_APP_CC_SWITCHES='-mdynamic-no-pic' fi if test "$FRAMEWORK_BUILD" = "1" ; then @@ -577,6 +579,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) |