Re: help cross-compiling gcc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Vincent Fortier kirjoitti 31.12.2022 klo 22.30:
Le sam. 31 déc. 2022, à 07 h 05, Kai Ruottu <kai.ruottu@xxxxxxxxxxx> a écrit :
As such I expected that the toolchain header files weren't
sufficient... But I just retested this and it actually did built
without it, thus meaning it isn't needed.
Quickly checked the 'include' and 'lib' stuff looked quite standard in the R1000 i686 case.
For pure curiosity I tried to reproduce the GCC in the
'r1000-gcc850_glibc226_i686-GPL.txz'
package. But with the "as it is now" stuff in this Synology toolchain -
with the glibc and kernel
headers being provided. And on my old CentOS 6 / i686 host with a CentOS
5 / i686 targeted
cross gcc-8.5.0. Everything went ok until hitting in this error when
compiling libstdc++ :

../../../../libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc
-fPIC -DPIC -o .libs/sanitizer_platform_limits_posix.o
../../../../libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc:902:46:
virhe: ”SCSI_IOCTL_TAGGED_DISABLE” on esittelemättä tällä näkyvyysalueella
     unsigned IOCTL_SCSI_IOCTL_TAGGED_DISABLE = SCSI_IOCTL_TAGGED_DISABLE;
^~~~~~~~~~~~~~~~~~~~~~~~~
../../../../libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc:902:46:
huom: suggested alternative: ”IOCTL_SCSI_IOCTL_TAGGED_DISABLE”
     unsigned IOCTL_SCSI_IOCTL_TAGGED_DISABLE = SCSI_IOCTL_TAGGED_DISABLE;
^~~~~~~~~~~~~~~~~~~~~~~~~
IOCTL_SCSI_IOCTL_TAGGED_DISABLE
../../../../libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc:903:45:
virhe: ”SCSI_IOCTL_TAGGED_ENABLE” on esittelemättä tällä näkyvyysalueella
     unsigned IOCTL_SCSI_IOCTL_TAGGED_ENABLE = SCSI_IOCTL_TAGGED_ENABLE;
^~~~~~~~~~~~~~~~~~~~~~~~
../../../../libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc:903:45:
huom: suggested alternative: ”IOCTL_SCSI_IOCTL_TAGGED_ENABLE”
     unsigned IOCTL_SCSI_IOCTL_TAGGED_ENABLE = SCSI_IOCTL_TAGGED_ENABLE;
^~~~~~~~~~~~~~~~~~~~~~~~
IOCTL_SCSI_IOCTL_TAGGED_ENABLE
make[4]: *** [sanitizer_platform_limits_posix.lo] Virhe 1
make[4]: Poistutaan hakemistosta
"/media/2c439158-ef3e-4dcf-a63b-03191c302829/home/src/gcc-8.5.0/build/i686-syno_r1000-linux-gnu/libsanitizer/sanitizer_common"
make[3]: *** [all-recursive] Virhe 1


I'm now tempted to patch GCC to remove the definitions from:
$ grep -Rl SCSI_IOCTL *
libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h
libsanitizer/sanitizer_common/sanitizer_common_interceptors_ioctl.inc
libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc

Any ideas and/or help much appreciated :)
I didn't invent any solution yet for this SCSI_IOCTL_TAGGED_* problem so I simply edited the by-configure-produced Makefile via removing all the requisites to build

libsanitizer. Then everything continued as expected.

Probably I will rebuild the toolchain from sources again, removing the
'--enable-libsanitizer' in the configure command. And the support for
'local language'(finnish, seen in the log) via adding the '--disable-nls'
there. The used configure command will be seen here :

# i686-syno_r1000-linux-gnu-gcc-8.5 -v
Using built-in specs.
COLLECT_GCC=i686-syno_r1000-linux-gnu-gcc-8.5
COLLECT_LTO_WRAPPER=/media/2c439158-ef3e-4dcf-a63b-03191c302829/opt/cross/bin/../lib/gcc/i686-syno_r1000-linux-gnu/8.5.0/lto-wrapper
Kohde: i686-syno_r1000-linux-gnu
Configured with: ../configure --build=i686-linux-gnu --host=i686-linux-gnu --target=i686-syno_r1000-linux-gnu --prefix=/opt/cross --libdir=/opt/cross/lib --libexecdir=/opt/cross/lib --with-sysroot=/opt/host-i686-syno_r1000-linux-gnu --enable-languages=c,c++ --with-arch=i686 --disable-tm-clone-registry --disable-multilib --enable-long-long --enable-default-pie --enable-__cxa_atexit --enable-cxx-flags=-D_FILE_OFFSET_BITS=64 --enable-libmudflap --enable-libgomp --enable-libssp --enable-libquadmath --enable-libquadmath-support --enable-libsanitizer --enable-libmpx --enable-lto --with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm' --enable-threads=posix --enable-target-optspace --disable-plugin --enable-gold --enable-version-specific-runtime-libs --with-gxx-include-dir=/opt/cross/include/c++/8.5.0 --program-prefix=i686-syno_r1000-linux-gnu- --program-suffix=-8.5
Säiemalli: posix
gcc-versio 8.5.0 (GCC)

The options were copied "selectively" from the original gcc-8.5.0 in the Synology toolchain (for a x86_64 host). The '$prefix' was my own standard '/opt/cross' and the '$sys-root' the
'/opt/host-$target'




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux