From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from fgw22-4.mail.saunalahti.fi (fgw22-4.mail.saunalahti.fi [62.142.5.109]) by sourceware.org (Postfix) with ESMTPS id D6F983858D1E for ; Sat, 31 Dec 2022 21:59:16 +0000 (GMT) Received: from [10.0.0.165] (mobile-access-6df063-121.dhcp.inet.fi [109.240.99.121]) by fgw22.mail.saunalahti.fi (Halon) with ESMTPSA id 58889d5f-8956-11ed-ae1c-005056bdf889; Sat, 31 Dec 2022 23:59:14 +0200 (EET) Message-ID: Date: Sat, 31 Dec 2022 23:59:00 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Subject: Re: help cross-compiling gcc To: Vincent Fortier Cc: gcc-help@gcc.gnu.org References: From: Kai Ruottu In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,KAM_ASCII_DIVIDERS,KAM_DMARC_STATUS,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Vincent Fortier kirjoitti 31.12.2022 klo 22.30: > Le sam. 31 déc. 2022, à 07 h 05, Kai Ruottu 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'