On Fri, 13 Aug 2010 02:47:43 +0200 Elias Pipping wrote:
> pipp...@bogus ~/build $ cd build/
> pipp...@bogus ~/build $ tar xf ~/Downloads/INIT.2010-08-11.tgz
> pipp...@bogus ~/build $ tar xf ~/Downloads/ast-base.2010-08-11.tgz
> pipp...@bogus ~/build $ ./bin/package only make ast-ksh
> CCFLAGS=3D'-march=3Dcore2 -pipe -O2' SHELL=3D/bin/sh
> that fails here:
> ++ /usr/bin/cc -shared -nostartfiles -o libshell.so.1.1
> -Wl,-whole-archive libshell.a -Wl,-no-whole-archive
> /home/pippld/arch/linux.i386-64/lib/libcmd.a
> /home/pipping/build/arch/linux.i386-64/lib/libast.a -lm -lc
> /usr/lib64/gcc/x86_64-pc-linux-gnu/4.4.4/../../../../x86_64-pc-linux-gnu/bi=
> n/ld:
> /home/pipping/build/arch/linux.i386-6recompile with -fPIC
> /home/pipping/build/arch/linux.i386-64/lib/libdll.a: could not read
> symbols: Bad value
> collect2: ld returned 1 exit status
> make [cmd/ksh93/cc-O,-D_BLD_DLL,-fPIC]: *** exit code 1 making libshell.so.=
> 1.1
> make [cmd/ksh93/cc-O,-D_BLD_DLL,-fPIC]: *** 1 action failed
> make [cmd/ksh93]: ".DLL.cc-O,-D_BLD_DLL,-fPIC", line 8: *** exit code
> 1 making cc-O,-D_BLD_DLL,-fPIC
> I should not be having this directory, should I? Something looks very
> wrong here.
the ksh nmake makefile builds an ast-static ksh with libshell.a
and in the cc-O,-D_BLD_DLL,-fPIC subdir the dynamic libshell.so
this is part of the general cc-% makerules rule
e.g., in a library dir you could
mkdir cc-g cc-pg
nmake install cc-
and the top level libfoo.a (or dll if $(CC.DLL) is in CCFLAGS), along with
cc-g/libfoo-g.a (build with -g) and cc-pg/libfoo-pg.a (built with -pg)
would be built
setting CCFLAGS for a global nmake build is probably not
going to work as expected, as you demonstrated
there would be problem if your CCFLAGS options were appended too
e.g., there are some .o's on some architectures that must not be
compiled with -O (because cc optimization on those architectures is buggy)
a better approach would be to override a $(probe -l C make cc) variables
e.g., CC.OPTIMIZE='-march=core2 -pipe -O2' -- this only works after nmake
is bootstrapped
_______________________________________________
ast-users mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-users