Overview
| Artifact ID: | d56202544336f1a41cff1e4aaf61b35d454e3ea8 |
|---|---|
| Ticket: | 761385ffffffffffffffffffffffffffffffffff
build problem on powerpc-ibm-aix5.2.0.0 |
| User & Date: | nobody on 2003-12-11 00:31:15 |
Changes
- icomment:
Logged In: NO I encounter this same bug on AIX 5.2, ppc. gcc adds the libgcc.a when linking, but if gcc was used to compile and when 'ldAix /bin/ld' is used for linking, the libgcc.a is not included. This patch to tcl8.4.5/unix/tcl.m4 works for me, and should be more portable than referencing specific files. *** tcl.m4.orig Wed Dec 10 09:38:54 2003 --- tcl.m4 Wed Dec 10 09:39:43 2003 *************** *** 874,879 **** --- 874,883 ---- LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} TCL_NEEDS_EXP_FILE=1 TCL_EXPORT_FILE_SUFFIX='${VERSION}${DBGX}.exp' + if test "$GCC" = "yes" ; then + LIBS="$LIBS `gcc -print-libgcc-file-name`" + fi + fi ;; AIX-*) I also tried linking with gcc, collecting all of the ld arguments and passing via -Wl, which also seems to work, still using ldAix to build the export file before invoking gcc: *** tcl.m4.orig Wed Dec 10 09:38:54 2003 --- tcl.m4 Wed Dec 10 10:02:33 2003 *************** *** 868,874 **** fi LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}' else ! SHLIB_LD="${TCL_SRC_DIR}/unix/ldAix /bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry ${SHLIB_LD_FLAGS}" DL_LIBS="-ldl" CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} --- 868,878 ---- fi LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}' else ! if test "$GCC" = "yes" ; then ! SHLIB_LD="${TCL_SRC_DIR}/unix/ldAix gcc -Wl,-bhalt:4,-bM:SRE,-bE:lib.exp,-H512,-T512,-bnoentry" ! else ! SHLIB_LD="${TCL_SRC_DIR}/unix/ldAix /bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry ${SHLIB_LD_FLAGS}" ! fi DL_LIBS="-ldl" CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} This seems to work just as well. The same change should be done to the tk8.4.5/unix/tcl.m4: *** tcl.m4.orig Wed Dec 10 10:26:52 2003 --- tcl.m4 Wed Dec 10 10:27:37 2003 *************** *** 868,874 **** fi LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}' else ! SHLIB_LD="${TCL_SRC_DIR}/unix/ldAix /bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry ${SHLIB_LD_FLAGS}" DL_LIBS="-ldl" CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} --- 868,878 ---- fi LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}' else ! if test "$GCC" = "yes" ; then ! SHLIB_LD="${TCL_SRC_DIR}/unix/ldAix gcc -Wl,-bhalt:4,-bM:SRE,-bE:lib.exp,-H512,-T512,-bnoentry ${SHLIB_LD_FLAGS}" ! else ! SHLIB_LD="${TCL_SRC_DIR}/unix/ldAix /bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry ${SHLIB_LD_FLAGS}" ! fi DL_LIBS="-ldl" CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} note the addition of ${SHLIB_LD_FLAGS} in the case of tk8.4.5/unix/tcl.m4 I was just at the dentist last week. Somehow, building *anything* on AIX seems like deja vu. -Tom Poindexter - login: "nobody"
- mimetype: "text/plain"
- username: "nobody"