Gnuk with GCC >= 5
Bertrand Jacquin
bertrand at jacquin.bzh
Mon Aug 27 23:21:22 CEST 2018
On Mon, Aug 27, 2018 at 03:51:32PM +0900, NIIBE Yutaka wrote:
> Hello,
>
> I wonder how you configure your gcc.
I let Gentoo do it for me :) Here is the configure statement:
* strip-flags: CFLAGS: changed '-march=native -O2 -pipe -fomit-frame-pointer' to '-march=native -O2 -pipe'
* strip-flags: CXXFLAGS: changed '-march=native -O2 -pipe -fomit-frame-pointer' to '-march=native -O2 -pipe'
* CFLAGS="-O2 -pipe"
* CXXFLAGS="-O2 -pipe"
* LDFLAGS="-Wl,-O1 -Wl,--as-needed"
* PREFIX: /usr
* BINPATH: /usr/x86_64-pc-linux-gnu/arm-none-eabi/gcc-bin/7.3.0
* LIBPATH: /usr/lib/gcc/arm-none-eabi/7.3.0
* DATAPATH: /usr/share/gcc-data/arm-none-eabi/7.3.0
* STDCXX_INCDIR: /usr/lib/gcc/arm-none-eabi/7.3.0/include/g++-v7
* Languages: c,jit
* Configuring GCC with:
* --host=x86_64-pc-linux-gnu
* --target=arm-none-eabi
* --build=x86_64-pc-linux-gnu
* --prefix=/usr
* --bindir=/usr/x86_64-pc-linux-gnu/arm-none-eabi/gcc-bin/7.3.0
* --includedir=/usr/lib/gcc/arm-none-eabi/7.3.0/include
* --datadir=/usr/share/gcc-data/arm-none-eabi/7.3.0
* --mandir=/usr/share/gcc-data/arm-none-eabi/7.3.0/man
* --infodir=/usr/share/gcc-data/arm-none-eabi/7.3.0/info
* --with-gxx-include-dir=/usr/lib/gcc/arm-none-eabi/7.3.0/include/g++-v7
* --with-python-dir=/share/gcc-data/arm-none-eabi/7.3.0/python
* --enable-languages=c,jit
* --enable-obsolete
* --enable-secureplt
* --disable-werror
* --with-system-zlib
* --enable-nls
* --without-included-gettext
* --enable-checking=release
* --with-bugurl=https://bugs.gentoo.org/
* --with-pkgversion=Gentoo Hardened 7.3.0-r3 p1.4
* --enable-esp
* --disable-libstdcxx-pch
* --enable-host-shared
* --enable-poison-system-directories
* --disable-libstdcxx-time
* --with-sysroot=/usr/arm-none-eabi
* --disable-bootstrap
* --with-newlib
* --enable-multilib
* --disable-altivec
* --disable-fixed-point
* --with-float=soft
* --disable-libgomp
* --disable-libmudflap
* --disable-libssp
* --disable-libcilkrts
* --disable-libmpx
* --enable-vtable-verify
* --enable-libvtv
* --disable-libquadmath
* --enable-lto
* --without-isl
* --disable-libsanitizer
* --enable-default-pie
* --enable-default-ssp
/var/tmp/portage/cross-arm-none-eabi/gcc-7.3.0-r3/work/gcc-7.3.0/configure --host=x86_64-pc-linux-gnu --target=arm-none-eabi --build=x86_64-pc-linux-gnu --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/arm-none-eabi/gcc-bin/7.3.0 --includedir=/usr/lib/gcc/arm-none-eabi/7.3.0/include --datadir=/usr/share/gcc-data/arm-none-eabi/7.3.0 --mandir=/usr/share/gcc-data/arm-none-eabi/7.3.0/man --infodir=/usr/share/gcc-data/arm-none-eabi/7.3.0/info --with-gxx-include-dir=/usr/lib/gcc/arm-none-eabi/7.3.0/include/g++-v7 --with-python-dir=/share/gcc-data/arm-none-eabi/7.3.0/python --enable-languages=c,jit --enable-obsolete --enable-secureplt --disable-werror --with-system-zlib --enable-nls --without-included-gettext --enable-checking=release --with-bugurl=https://bugs.gentoo.org/ --with-pkgversion=Gentoo Hardened 7.3.0-r3 p1.4 --enable-esp --disable-libstdcxx-pch --enable-host-shared --enable-poison-system-directories --disable-libstdcxx-time --with-sysroot=/usr/arm-none-eabi --disable-bootstrap --with-newlib --enable-multilib --disable-altivec --disable-fixed-point --with-float=soft --disable-libgomp --disable-libmudflap --disable-libssp --disable-libcilkrts --disable-libmpx --enable-vtable-verify --enable-libvtv --disable-libquadmath --enable-lto --without-isl --disable-libsanitizer --enable-default-pie --enable-default-ssp
> Bertrand Jacquin <bertrand at jacquin.bzh> wrote:
> > Note that newlib remains the same when I am using gcc 4.9.4 or gcc 7.3.0
>
> I think that newlib for gcc 7 should be configured/compiled by gcc 7.
Yes, this was the case, everytime I rebuilt gcc, I also rebuild newlib.
> > * gcc-7.3.0
> [...]
> > build/chopstx.o: dynamic relocation against `chx_idle' in read-only section `.text.preempt'
>
> Strange. Dynamic relocation should never happen.
>
> > I am not sure which version of the libc this corresponds to
>
> My libc for arm-none-eabi is:
>
> Package: libnewlib-arm-none-eabi
> Version: 3.0.0.20180802-2
>
> I think that the issue is not the souce version, but which gcc it is built.
newlib 3.0.0 is not available in gentoo yet unfortunately, even thought
a request for an update was made in https://bugs.gentoo.org/656018
Cheers
--
Bertrand
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: Digital signature
URL: <https://lists.gnupg.org/pipermail/gnuk-users/attachments/20180827/aea114fc/attachment.sig>
More information about the Gnuk-users
mailing list