This is the mail archive of the
libstdc++@sources.redhat.com
mailing list for the libstdc++ project.
mkcheck.in partial patch for AIX
- To: libstdc++ at sources dot redhat dot com
- Subject: mkcheck.in partial patch for AIX
- From: David Edelsohn <dje at watson dot ibm dot com>
- Date: Sat, 04 Nov 2000 00:24:51 -0500
- cc: Mark Mitchell <mark at codesourcery dot com>
The following patch provides support for invoking "size" on AIX
and uses the GCC "-Wl" option more efficiently.
However, the problem with running mkcheck on AIX is that AIX
linker does not support the "-rpath" option. It has a "-blibpath:"
option, but the -L$LIB_PATH already suffices.
Any suggestion on how one would prefer making -rpath optional?
Substitute @rpath@ when building mkcheck? Test @host_os@ at runtime to
define $RPATH or choose $CXX template?
Thanks, David
* mkcheck (test_file): Combine -Wl arguments. Parse "size" on
AIX.
Index: mkcheck.in
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/mkcheck.in,v
retrieving revision 1.31
diff -c -p -r1.31 mkcheck.in
*** mkcheck.in 2000/11/03 02:29:28 1.31
--- mkcheck.in 2000/11/04 05:14:23
*************** test_file()
*** 198,204 ****
# eventually have to calculate time_t anyhow. Or 3) just grab two
# time_t's (no more overhead than grabbing two date(1)'s).
COMP_TIME_START=$($TEST_DIR/printnow)
! $CXX $CXX_FLAG $S_FLAG $INC_PATH -L$LIB_PATH -Wl,-rpath -Wl,$LIB_PATH \
$SRC_NAME -o $EXENAME 2>> $LOG_FILE
COMP_TIME_END=$($TEST_DIR/printnow)
--- 198,204 ----
# eventually have to calculate time_t anyhow. Or 3) just grab two
# time_t's (no more overhead than grabbing two date(1)'s).
COMP_TIME_START=$($TEST_DIR/printnow)
! $CXX $CXX_FLAG $S_FLAG $INC_PATH -L$LIB_PATH -Wl,-rpath,$LIB_PATH \
$SRC_NAME -o $EXENAME 2>> $LOG_FILE
COMP_TIME_END=$($TEST_DIR/printnow)
*************** test_file()
*** 210,215 ****
--- 210,223 ----
if [ -f $EXENAME ]; then
case @host_os@ in
+ *aix*)
+ # These numbers seem to match up to text/data/total,
+ # although their meanings seem to be different. Very
+ # important to not compare these numbers across platforms.
+ TEXT="$(size -X32_64 $EXENAME | awk '{print $2}')"
+ DATA="$(size -X32_64 $EXENAME | awk '{print $4}')"
+ SIZE="$(size -X32_64 $EXENAME | awk '{print $12}')"
+ ;;
*solaris2.8*)
# These numbers seem to match up to text/data/total,
# although their meanings seem to be different. Very
*************** test_file()
*** 307,313 ****
fi
else
# the file did not compile. Write out compilation info to the log file.
! echo "$CXX $CXX_FLAG $S_FLAG $INC_PATH -L$LIB_PATH -Wl,-rpath -Wl,$LIB_PATH \
$SRC_NAME -o $EXENAME" 2>> $LOG_FILE
RESULT="-"
--- 315,321 ----
fi
else
# the file did not compile. Write out compilation info to the log file.
! echo "$CXX $CXX_FLAG $S_FLAG $INC_PATH -L$LIB_PATH -Wl,-rpath,$LIB_PATH \
$SRC_NAME -o $EXENAME" 2>> $LOG_FILE
RESULT="-"