[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [MiNT] gcc 4.7.2 and -mshort
You need to compile GCC with --enable-multilib
Alan.
On 05/03/16 13:02, Helmut Karlowski wrote:
> I have a problem with the above: gcc does not link 16bit-libs when it has
> been given the -mshort-option:
>
>
> #/usr/bin/gcc -v -mshort -m68040 t.o -lgem &>gcc.out
> #cat gcc.out
> Using built-in specs.
> COLLECT_GCC=/usr/bin/gcc
> COLLECT_LTO_WRAPPER=/f/usr/m68k-atari-mint/gcc-bin/4.7.2/../../../libexec/gcc/m68k-atari-mint/4.7.2/lto-wrapper
>
> Target: m68k-atari-mint
> Configured with:
> /j/var/tmp/portage/sys-devel/gcc-4.7.2-r1/work/gcc-4.7.2/configure
> --prefix=/usr --bindir=/usr/m68k-atari-mint/gcc-bin/4.7.2
> --includedir=/usr/lib/gcc/m68k-atari-mint/4.7.2/include
> --datadir=/usr/share/gcc-data/m68k-atari-mint/4.7.2
> --mandir=/usr/share/gcc-data/m68k-atari-mint/4.7.2/man
> --infodir=/usr/share/gcc-data/m68k-atari-mint/4.7.2/info
> --with-gxx-include-dir=/usr/lib/gcc/m68k-atari-mint/4.7.2/include/g++-v4
> --host=m68k-atari-mint --build=m68k-atari-mint --disable-altivec
> --disable-fixed-point --without-cloog --without-ppl --disable-lto
> --disable-nls --with-system-zlib --enable-obsolete --disable-werror
> --enable-secureplt --disable-multilib --enable-libmudflap
> --disable-libssp --disable-libgomp
> --with-python-dir=/share/gcc-data/m68k-atari-mint/4.7.2/python
> --enable-checking=release --disable-libgcj --enable-libstdcxx-time
> --enable-languages=c,c++,fortran --disable-shared
> --enable-threads=posix --with-local-prefix=/usr
> --with-bugurl=http://bugs.gentoo.org/ --with-pkgversion='Gentoo
> 4.7.2-r1 p1.5, pie-0.5.5' --enable-multilib
> Thread model: posix
> gcc version 4.7.2 (Gentoo 4.7.2-r1 p1.5, pie-0.5.5)
> COMPILER_PATH=/f/usr/m68k-atari-mint/gcc-bin/4.7.2/../../../libexec/gcc/m68k-atari-mint/4.7.2/:/f/usr/m68k-atari-mint/gcc-bin/4.7.2/../../../libexec/gcc/:/f/usr/m68k-atari-mint/gcc-bin/4.7.2/../../../lib/gcc/m68k-atari-mint/4.7.2/../../../../m68k-atari-mint/bin/
>
> LIBRARY_PATH=/f/usr/m68k-atari-mint/gcc-bin/4.7.2/../../../lib/gcc/m68k-atari-mint/4.7.2/m68020-60/mshort/:/f/usr/m68k-atari-mint/gcc-bin/4.7.2/../../../lib/gcc/m68k-atari-mint/4.7.2/../../../m68020-60/mshort/:/lib/m68020-60/mshort/:/usr/lib/m68020-60/mshort/:/f/usr/m68k-atari-mint/gcc-bin/4.7.2/../../../lib/gcc/m68k-atari-mint/4.7.2/:/f/usr/m68k-atari-mint/gcc-bin/4.7.2/../../../lib/gcc/:/f/usr/m68k-atari-mint/gcc-bin/4.7.2/../../../lib/gcc/m68k-atari-mint/4.7.2/../../../:/lib/:/usr/lib/
>
> COLLECT_GCC_OPTIONS='-v' '-mshort' '-mcpu=68040'
> /f/usr/m68k-atari-mint/gcc-bin/4.7.2/../../../libexec/gcc/m68k-atari-mint/4.7.2/collect2
> /f/usr/m68k-atari-mint/gcc-bin/4.7.2/../../../lib/gcc/m68k-atari-mint/4.7.2/../../../crt0.o
> -L/f/usr/m68k-atari-mint/gcc-bin/4.7.2/../../../lib/gcc/m68k-atari-mint/4.7.2
> -L/f/usr/m68k-atari-mint/gcc-bin/4.7.2/../../../lib/gcc
> -L/f/usr/m68k-atari-mint/gcc-bin/4.7.2/../../../lib/gcc/m68k-atari-mint/4.7.2/../../..
> t.o -lgem -lgcc -lc -lgcc
> /bin/ld: cannot find -lgem
> collect2: error: ld returned 1 exit status
> #ls -l /usr/lib/**/libgem*
> -rw-r--r-- 1 1004 513 169826 Feb 5 2012 /usr/lib/libgem
> -rw-r--r-- 1 1004 513 157524 Oct 29 2011
> /usr/lib/m68020-60/libgem
> -rw-r--r-- 1 1001 513 156568 Oct 29 2011
> /usr/lib/m68020-60/mshort/libgem.a
> -rwxrwxrwx 1 1001 513 168356 Feb 5 2012
> /usr/lib/mshort/libgem.a*
>
> I renamed the non-mshort libgem.a to keep gcc from using that.
> In LIBRARY_PATH it has mshort, but it does not use it.
>
> With a gcc-wrapper-script that explicitly sets -L/usr/lib/.../mshort
> it works.
>
> Is it something in my configuration? Is it a bug?
>
> -Helmut
>
>