Hi all!
Just a question: I've downloaded latest cvs versions of binutils, gcc and glibc.
Fedora by default uses "--hash-style=gnu" so I would like to know how to compile these packages from sources in this way.
Before configuring them, I thought of something like: "export {gcc,cc,c++,g++}={binary} -Wl,--hash-style=gnu,--enable-new-dtags" and "export ld="ld --hash-style=gnu --enable-new-dtags".
However, when passing "make install" to gcc it broke with: make[2]: Leaving directory `/mnt/lfs/sources/gcc-build/fixincludes' make[2]: Entering directory `/mnt/lfs/sources/gcc-build/gcc' gcc -c -g -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition -Wmissing-format-attribute -Werror -fno-common -DHAVE_CONFIG_H -I. -I. -I../../gcc/gcc -I../../gcc/gcc/. -I../../gcc/gcc/../include -I../../gcc/gcc/../libcpp/include -I../../gcc/gcc/../libdecnumber -I../libdecnumber ../../gcc/gcc/tree-ssanames.c -o tree-ssanames.o cc1: error: unrecognized command line option "-Wno-overlength-strings" make[2]: *** [tree-ssanames.o] Error 1 make[2]: Leaving directory `/mnt/lfs/sources/gcc-build/gcc' make[1]: *** [install-gcc] Error 2 make[1]: Leaving directory `/mnt/lfs/sources/gcc-build' make: *** [install] Error 2
Doing a ./cc1 --help | grep overlength in the build-dir of gcc ouputs: -Woverlength-strings Warn if a string is longer than the maximum -Wold-style-definition, -Woverlength-strings, -Wstrict-prototypes, -Wmissing-include-dirs, -Wmultichar, -Wnormalized=, -Woverlength-strings, -Wold-style-definition, -Woverlength-strings, -Woverride-init, -Wparentheses, -Woverlength-strings, -Woverloaded-virtual, -Wparentheses, -Wpmf-conversions,
and "-Wno-overlength-strings" is not listed.
gcc version I'm trying to compile is: "GNU C version 4.3.0 20061128 (experimental) (i686-pc-linux-gnu) compiled by GNU C version 4.3.0 20061128 (experimental). GCC heuristics: --param gcc-min-expand=30 --param gcc-min-heapsize=4096".
GCC version on host system is GCC version 4.1.1.
Question: is it safe to delete -Wno-overlength-strings from the sources or what?
Is it correct the way I thought about compiling with the --hash-style option or I should pass it in another way?
Thanks in advance, Luca
On Fri, Dec 01, 2006 at 11:39:12AM +0100, Luca wrote:
Just a question: I've downloaded latest cvs versions of binutils, gcc and glibc.
Fedora by default uses "--hash-style=gnu" so I would like to know how to compile these packages from sources in this way.
Before configuring them, I thought of something like: "export {gcc,cc,c++,g++}={binary} -Wl,--hash-style=gnu,--enable-new-dtags" and "export ld="ld --hash-style=gnu --enable-new-dtags".
That's wrong.
Look at gcc41-hash-style-gnu.patch in FC gcc src.rpm to see how FC is doing this.
Jakub
Luca wrote:
Thanks for the reply Jakub and for pointing me your patch in the src.rpm.
Right it changes the LINK_SPEC.
Luca
Now I have just tried to compile gcc-4.3.0-20061201 with the hash patch applied and when configuring for stage 2 I receive:
Configuring stage 2 in ./intl configure: creating cache ./config.cache checking whether make sets $(MAKE)... yes checking for a BSD-compatible install... /usr/bin/install -c checking whether NLS is requested... no checking for msgfmt... /usr/bin/msgfmt checking for gmsgfmt... /usr/bin/msgfmt checking for xgettext... /usr/bin/xgettext checking for msgmerge... /usr/bin/msgmerge checking for i686-pc-linux-gnu-gcc... /mnt/lfs/sources/gnu-gcc/gcc-build/./prev-gcc/xgcc -B/mnt/lfs/sources/gnu-gcc/gcc-build/./prev-gcc/ -B/tools/i686-pc-linux-gnu/bin/ checking for C compiler default output file name... a.out checking whether the C compiler works... configure: error: cannot run C compiled programs. If you meant to cross compile, use `--host'. See `config.log' for more details. make[2]: *** [configure-stage2-intl] Error 1 make[2]: Leaving directory `/mnt/lfs/sources/gnu-gcc/gcc-build' make[1]: *** [stage2-bubble] Error 2 make[1]: Leaving directory `/mnt/lfs/sources/gnu-gcc/gcc-build' make: *** [all] Error 2
Linux-Headers-2.6.19, binutils-2.17.50 and glibc-20061106-headers installed.
The config.log in intl dir outputs this: configure:2118: checking for C compiler default output file name configure:2121: /mnt/lfs/sources/gnu-gcc/gcc-build/./prev-gcc/xgcc -B/mnt/lfs/sources/gnu-gcc/gcc-build/./prev-gcc/ -B/tools/i686-pc-linux-gnu/bin/ -O2 -g -fomit-frame-pointer conftest.c >&5 configure:2124: $? = 0 configure:2170: result: a.out configure:2175: checking whether the C compiler works configure:2181: ./a.out /mnt/lfs/sources/gnu-gcc/gcc/intl/configure: line 2182: 31539 Floating point exception./$ac_file configure:2184: $? = 136 configure:2193: error: cannot run C compiled programs. If you meant to cross compile, use `--host'. See `config.log' for more details.
I'm not cross-compiling; processor is an AMD64, but the system I'm on is configured like a i686 (kernel too; uname -m outputs i686). I didn't pass --host=, --target=; I had some floating point errors with some pre-compiled rpms but never when building from sources.
Luca
On Fri, Dec 01, 2006 at 03:53:51PM +0100, Luca wrote:
Now I have just tried to compile gcc-4.3.0-20061201 with the hash patch applied and when configuring for stage 2 I receive:
This is not a Linux from Scratch mailing list, please move it to such. Obviously you haven't installed glibc which supports .gnu.hash yet, which is a precondition to running any --hash-style=gnu linked programs.
Jakub
Jakub Jelinek wrote:
On Fri, Dec 01, 2006 at 03:53:51PM +0100, Luca wrote:
Now I have just tried to compile gcc-4.3.0-20061201 with the hash patch applied and when configuring for stage 2 I receive:
This is not a Linux from Scratch mailing list, please move it to such. Obviously you haven't installed glibc which supports .gnu.hash yet, which is a precondition to running any --hash-style=gnu linked programs.
Jakub
I know that this is not a LinuxFromScratch mailing list; I asked only about the hash-style; Fedora comes with some packages version; I created a sub-environment to try newer versions, that's all. For the glibc pre-requisite I didn't know that. Anyway, do you have any idea about the floating point?
Luca wrote:
I know that this is not a LinuxFromScratch mailing list; I asked only about the hash-style; Fedora comes with some packages version; I created a sub-environment to try newer versions, that's all. For the glibc pre-requisite I didn't know that. Anyway, do you have any idea about the floating point?
Forgot a PS: I meant about the stage 2 when passing "make bootstrap" after configuring gcc.