Igor Schein on Tue, 4 Feb 2003 14:43:37 -0500 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: get_ld patch |
On Tue, Feb 04, 2003 at 02:27:35PM -0500, Igor Schein wrote: > On Tue, Feb 04, 2003 at 07:53:49PM +0100, Karim BELABAS wrote: > > On Tue, 4 Feb 2003, Igor Schein wrote: > > > -rpath is a linker switch, not a compiler switch, so the following is > > > needed ( at least for gcc ): > > > > > > Index: config/get_ld > > > =================================================================== > > > RCS file: /home/megrez/cvsroot/pari/config/get_ld,v > > > retrieving revision 1.5 > > > diff -u -r1.5 get_ld > > > --- config/get_ld 2003/01/20 20:36:03 1.5 > > > +++ config/get_ld 2003/02/04 17:12:33 > > > @@ -53,6 +53,6 @@ > > > echo "Executable linker is $LD $LDFLAGS" > > > > > > case "$osname" in > > > - osf1|linux|cygwin*|freebsd) runpathprefix='-rpath' ;; > > > + osf1|linux|cygwin*|freebsd) runpathprefix='-Wl,-rpath' ;; > > > solaris) runpathprefix='-R' ;; > > > esac > > > > It should not be needed [ cf config/Makefile.SH:162-166 ]. The current logic > > is the we find out the linker flags, then depending on the compiler/linker > > pair, we pass these flags directly or through -Wl [ if $LDisGCC is set ]. > > Oh, I know what happened, I did 'env CC="gcc -W" ./Configure', like > I've done many times in the past, but because of -W get_ld failed to > set LDisGCC. There must be a better way of detection. > > Igor > This brings up another point I would like to make. Right now, without autoconf structure in place, the user doesn't have a seamless control over compiler flags. Like in the situation above, I just wanted to add -W flag to default flags without having to edit dft file. Right now there're too many flag-related variables, and there's no well-defined relationships between them: ASFLAGS='' KERNELCPPFLAGS='' LDFLAGS=' -export-dynamic' DYNFLAGS='' cflags='-O3 -DGCC_INLINE -Wall -fomit-frame-pointer ' DBGFLAGS='-g -Wall' OPTFLAGS='-O3 -DGCC_INLINE -Wall -fomit-frame-pointer' DLCFLAGS='' LDFLAGS=' -export-dynamic' DLLDFLAGS='-shared -soname $(LIBPARI_SONAME)' EXTRADLLDFLAGS='-lc ${LIBS}' I would rather see standard CFLAGS or CCOPT. I understand perfectly well other people who have pointed out autoconf's shortcomings in the past on this list, but one can't take away its merits as far as user-friendliness goes. Igor