Hi, On 11/15/05, Kai Ruottu <karuottu@xxxxxxxx> wrote: > > The FSF GCC sources seem to expect the Linux/x86_64 installations > to have the default 64-bit stuff in '*/lib64' and the 32-bit stuff > in '*/lib', so you have a problem to solve with this. What kind of > Linux/x86_64 puts its libraries this way? I believe Debian and Debian-based distros do (I'm using Ubuntu). > Anyway the place where the default settings for GCC are told, is > the 'gcc/config/i386/t-linux64', a clip from its beginning : > > ----------------------- clip ------------------------------------ > # On x86-64 we do not need any exports for glibc for 64-bit libgcc_s, > # override the settings > # from t-slibgcc-elf-ver and t-linux > SHLIB_MAPFILES = $(srcdir)/libgcc-std.ver \ > $(srcdir)/config/i386/libgcc-x86_64-glibc.ver > > MULTILIB_OPTIONS = m64/m32 > MULTILIB_DIRNAMES = 64 32 > MULTILIB_OSDIRNAMES = ../lib64 ../lib > ----------------------- clip ------------------------------------ > > So changing the last row to be: > > MULTILIB_OSDIRNAMES = ../lib ../lib32 > > should change the default behaviour to be for your 'custom' > Linux/x86_64... At least I think this being the place for setting > those 'operating system directory names'. > I did that, and gcc fails on: checking for g++ that supports -ffunction-sections -fdata-sections... yes checking for sin in -lm... configure: error: Link tests are not allowed after GCC_NO_EXECUTABLES. make: *** [configure-target-libstdc++-v3] Error 1 as before. I tried the make install-gcc trick to bypass libstdc++, and that installs properly but it still has problems with crt*.o: $ gcc -o hello -m32 -v hello.c Using built-in specs. Target: x86_64-unknown-linux-gnu Configured with: ../gcc-4.0.2/configure Thread model: posix gcc version 4.0.2 /usr/local/libexec/gcc/x86_64-unknown-linux-gnu/4.0.2/cc1 -quiet -v hello.c -quiet -dumpbase hello.c -m32 -mtune=k8 -auxbase hello -version -o /tmp/ccWDV8FJ.s ignoring nonexistent directory "NONE/include" ignoring nonexistent directory "/usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.0.2/../../../../x86_64-unknown-linux-gnu/include" #include "..." search starts here: #include <...> search starts here: /usr/local/include /usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.0.2/include /usr/include End of search list. GNU C version 4.0.2 (x86_64-unknown-linux-gnu) compiled by GNU C version 4.0.2. GGC heuristics: --param ggc-min-expand=98 --param ggc-min-heapsize=128234 as -V -Qy --32 -o /tmp/ccqG9m2o.o /tmp/ccWDV8FJ.s GNU assembler version 2.15 (x86_64-linux) using BFD version 2.15 /usr/local/libexec/gcc/x86_64-unknown-linux-gnu/4.0.2/collect2 --eh-frame-hdr -m elf_i386 -dynamic-linker /lib/ld-linux.so.2 -o hello /usr/lib/../lib32/crt1.o /usr/lib/../lib32/crti.o /usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.0.2/32/crtbegin.o -L/usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.0.2/32 -L/usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.0.2 -L/usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.0.2/../../../../lib32 -L/usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.0.2/../../.. -L/lib/../lib32 -L/usr/lib/../lib32 /tmp/ccqG9m2o.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.0.2/32/crtend.o /usr/lib/../lib32/crtn.o /usr/lib/../lib32/crt1.o(.text+0xc): In function `_start': ../sysdeps/i386/elf/start.S:92: undefined reference to `__libc_csu_fini' /usr/lib/../lib32/crt1.o(.text+0x11):../sysdeps/i386/elf/start.S:93: undefined reference to `__libc_csu_init' collect2: ld returned 1 exit status Chris Lu