public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Kai Ruottu <kai.ruottu@wippies.com>
To: Vincent Fortier <th0ma7@gmail.com>
Cc: gcc-help@gcc.gnu.org
Subject: Re: help cross-compiling gcc
Date: Sat, 31 Dec 2022 23:59:00 +0200	[thread overview]
Message-ID: <b585dc04-9396-5202-3ef5-241f62ac58c8@wippies.com> (raw)
In-Reply-To: <CALAySuLJft+oLQ3cd56Zp_yk8ecDyCtpeh7CRsny=ZcPQ3K2DA@mail.gmail.com>

Vincent Fortier kirjoitti 31.12.2022 klo 22.30:
> Le sam. 31 déc. 2022, à 07 h 05, Kai Ruottu <kai.ruottu@wippies.com> 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'


  parent reply	other threads:[~2022-12-31 21:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-29 21:24 Vincent Fortier
2022-12-31 12:04 ` Kai Ruottu
2022-12-31 20:30   ` Vincent Fortier
2022-12-31 20:47     ` Tom Kacvinsky
2022-12-31 21:59     ` Kai Ruottu [this message]
2023-04-04  1:23       ` Vincent Fortier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b585dc04-9396-5202-3ef5-241f62ac58c8@wippies.com \
    --to=kai.ruottu@wippies.com \
    --cc=gcc-help@gcc.gnu.org \
    --cc=th0ma7@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).