This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
mknumeric_limits
- To: bkoz at redhat dot com
- Subject: mknumeric_limits
- From: Jeffrey A Law <law at redhat dot com>
- Date: Mon, 19 Feb 2001 10:01:44 -0700
- cc: gcc at gcc dot gnu dot org
- Reply-To: law at redhat dot com
What's the point behind this code in mknumeric_limits:
case `uname` in
CYGWIN*)
LDFLAGS='-nodefaultlibs -lcygwin -lc -lkernel32 -lgcc' ;;
AIX*)
case $CXX in
*pthread*)
LDFLAGS='-nodefaultlibs -lgcc -L/usr/lib/threads -lpthreads
-lc_
r /usr/lib/libc.a' ;;
*)
LDFLAGS='-nodefaultlibs -lgcc -lc' ;;
esac
;;
*)
LDFLAGS='-nodefaultlibs -lgcc -lc' ;;
esac
First, it seems rather odd to be using "uname" like that, unless this code
is supposed to be run on the build machine.
Second, by using uname instead of a triplet, we lose the ability to
select behavior on the triplet. This is important when you consider
systems like the PA which have two completely different toolchains that
can not interoperate with each other.
Third, what's the purpose behind -nodefaultlibs, then listing the libraries
you want explicitly? If we're really just building something for the
build system, why not let the compiler figure out what libraries need to
be linked to create an executable?
The reason I'm looking at this code is I need to make it do something
slightly different for the PA64 toolchain (but not for the PA32 toolchain)
and there is no way you can tell which one you're using by running uname.
jeff