From: Peter Dyballa <Peter_Dyballa@Web.DE>
To: gcc-help@gcc.gnu.org
Subject: Configuring GCC 10.3 on PPC Mac OS X 10.4.11/Tiger for build reveals flaws in configure scripts
Date: Fri, 25 Nov 2022 11:19:46 +0100 [thread overview]
Message-ID: <F5B66C64-1021-4953-84AF-77E74CBDEDB9@Web.DE> (raw)
Hello!
I am just showing the faults and the code causing them, no cure, when building with MacPorts:
----------------------
Configuring stage 1 in ./isl
..../gcc10-bootstrap/work/gcc-10.3.0/isl/configure: line 1: cd: /opt/local/libexec/gcc10-bootstrap: No such file or directory
checking for powerpc-apple-darwin8.11.0-gcc...
checking whether we are using the GNU C compiler... (cached) yes
..../gcc10-bootstrap/work/gcc-10.3.0/isl/configure: line 5363: test: =: unary operator expected
checking whether ..../gcc10-bootstrap/work/bins/gcc accepts -g... yes
5333 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
5334 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
5335 if ${ac_cv_c_compiler_gnu+:} false; then :
5336 $as_echo_n "(cached) " >&6
5337 else
5338 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5339 /* end confdefs.h. */
5340
5341 int
5342 main ()
5343 {
5344 #ifndef __GNUC__
5345 choke me
5346 #endif
5347
5348 ;
5349 return 0;
5350 }
5351 _ACEOF
5352 if ac_fn_c_try_compile "$LINENO"; then :
5353 ac_compiler_gnu=yes
5354 else
5355 ac_compiler_gnu=no
5356 fi
5357 rm -f core conftest.err conftest.$ac_build_objext conftest.$ac_ext
5358 ac_cv_c_compiler_gnu=$ac_compiler_gnu
5359
5360 fi
5361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
5362 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
5363 if test $ac_compiler_gnu = yes; then
5364 GCC_FOR_BUILD=yes
5365 else
5366 GCC_FOR_BUILD=
5367 fi
5368 ac_test_CFLAGS=${CFLAGS_FOR_BUILD+set}
5369 ac_save_CFLAGS=$CFLAGS_FOR_BUILD
5370 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC_FOR_BUILD accepts -g" >&5
5371 $as_echo_n "checking whether $CC_FOR_BUILD accepts -g... " >&6; }
----------------------
Configuring stage 2 in ./isl
configure: creating cache ./config.cache
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ..../gcc10-bootstrap/work/gcc-10.3.0/isl/./install-sh -c -d
checking for gawk... awk
checking whether ..../gcc10-bootstrap/work/bins/make sets $(MAKE)... yes
checking whether ..../gcc10-bootstrap/work/bins/make supports nested variables... yes
checking whether ..../gcc10-bootstrap/work/bins/make supports nested variables... (cached) yes
..../gcc10-bootstrap/work/gcc-10.3.0/isl/configure: line 1: cd: /opt/local/libexec/gcc10-bootstrap: No such file or directory
checking for powerpc-apple-darwin8.11.0-gcc...
checking whether we are using the GNU C compiler... (cached) yes
..../gcc10-bootstrap/work/gcc-10.3.0/isl/configure: line 5363: test: =: unary operator expected
checking whether ..../gcc10-bootstrap/work/build/./prev-gcc/xgcc -B..../gcc10-bootstrap/work/build/./prev-gcc/ -B/opt/local/libexec/gcc10-bootstrap/powerpc-apple-darwin8.11.0/bin/ -B/opt/local/libexec/gcc10-bootstrap/powerpc-apple-darwin8.11.0/bin/ -B/opt/local/libexec/gcc10-bootstrap/powerpc-apple-darwin8.11.0/lib/ -isystem /opt/local/libexec/gcc10-bootstrap/powerpc-apple-darwin8.11.0/include -isystem /opt/local/libexec/gcc10-bootstrap/powerpc-apple-darwin8.11.0/sys-include -fno-checking accepts -g... yes
----------------------
Configuring stage 3 in ./isl
configure: creating cache ./config.cache
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ..../gcc10-bootstrap/work/gcc-10.3.0/isl/./install-sh -c -d
checking for gawk... awk
checking whether ..../gcc10-bootstrap/work/bins/make sets $(MAKE)... yes
checking whether ..../gcc10-bootstrap/work/bins/make supports nested variables... yes
checking whether ..../gcc10-bootstrap/work/bins/make supports nested variables... (cached) yes
..../gcc10-bootstrap/work/gcc-10.3.0/isl/configure: line 1: cd: /opt/local/libexec/gcc10-bootstrap: No such file or directory
checking for powerpc-apple-darwin8.11.0-gcc...
checking whether we are using the GNU C compiler... (cached) yes
..../gcc10-bootstrap/work/gcc-10.3.0/isl/configure: line 5363: test: =: unary operator expected
checking whether ..../gcc10-bootstrap/work/build/./prev-gcc/xgcc -B..../gcc10-bootstrap/work/build/./prev-gcc/ -B/opt/local/libexec/gcc10-bootstrap/powerpc-apple-darwin8.11.0/bin/ -B/opt/local/libexec/gcc10-bootstrap/powerpc-apple-darwin8.11.0/bin/ -B/opt/local/libexec/gcc10-bootstrap/powerpc-apple-darwin8.11.0/lib/ -isystem /opt/local/libexec/gcc10-bootstrap/powerpc-apple-darwin8.11.0/include -isystem /opt/local/libexec/gcc10-bootstrap/powerpc-apple-darwin8.11.0/sys-include -fchecking=1 accepts -g... yes
==================================
Configuring stage 1 in ./libbacktrace
checking for objcopy... no
checking for readelf... readelf
checking whether objcopy supports debuglink... ..../gcc10-bootstrap/work/gcc-10.3.0/libbacktrace/configure: line 13557: --add-gnu-debuglink=x: command not found
no
checking whether tests can run... yes
13553 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether objcopy supports debuglink" >&5
13554 $as_echo_n "checking whether objcopy supports debuglink... " >&6; }
13555 if ${libbacktrace_cv_objcopy_debuglink+:} false; then :
13556 $as_echo_n "(cached) " >&6
13557 else
13558 if test -n "${with_target_subdir}"; then
13559 libbacktrace_cv_objcopy_debuglink=no
13560 elif ${OBJCOPY} --add-gnu-debuglink=x /bin/ls /tmp/ls$$; then
13561 rm -f /tmp/ls$$
13562 libbacktrace_cv_objcopy_debuglink=yes
13563 else
13564 libbacktrace_cv_objcopy_debuglink=no
13565 fi
13566 fi
13567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libbacktrace_cv_objcopy_debuglink" >&5
13568 $as_echo "$libbacktrace_cv_objcopy_debuglink" >&6; }
13569 if test "$libbacktrace_cv_objcopy_debuglink" = yes; then
13570 HAVE_OBJCOPY_DEBUGLINK_TRUE=
13571 HAVE_OBJCOPY_DEBUGLINK_FALSE='#'
13572 else
13573 HAVE_OBJCOPY_DEBUGLINK_TRUE='#'
13574 HAVE_OBJCOPY_DEBUGLINK_FALSE=
13575 fi
----------------------
Configuring stage 2 in ./libbacktrace
checking for readelf... readelf
checking whether objcopy supports debuglink... ..../gcc10-bootstrap/work/gcc-10.3.0/libbacktrace/configure: line 13557: --add-gnu-debuglink=x: command not found
no
checking whether tests can run... yes
==================================
Configuring stage 2 in powerpc-apple-darwin8.11.0/libstdc++-v3
checking for uchar.h... no
no
checking for int64_t... yes
-- I am not sure, if this is really the correct configure script file, gcc-10.3.0/libstdc++-v3/configure? (Maybe I checked one stage too late…)
19101 # Test uchar.h.
19102 for ac_header in uchar.h
19103 do :
19104 ac_fn_c_check_header_mongrel "$LINENO" "uchar.h" "ac_cv_header_uchar_h" "$ac_includes_default"
19105 if test "x$ac_cv_header_uchar_h" = xyes; then :
19106 cat >>confdefs.h <<_ACEOF
19107 #define HAVE_UCHAR_H 1
19108 _ACEOF
19109 ac_has_uchar_h=yes
19110 else
19111 ac_has_uchar_h=no
19112 fi
19113
19114 done
19115
19116
19117
19118 ac_ext=cpp
19119 ac_cpp='$CXXCPP $CPPFLAGS'
19120 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19121 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19122 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19123
19124 ac_save_CXXFLAGS="$CXXFLAGS"
19125 CXXFLAGS="$CXXFLAGS -std=c++11"
19126
19127 if test x"$ac_has_uchar_h" = x"yes"; then
19128 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ISO C11 support for <uchar.h>" >&5
19129 $as_echo_n "checking for ISO C11 support for <uchar.h>... " >&6; }
19130 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19131 /* end confdefs.h. */
19132 #include <uchar.h>
19133 #ifdef __STDC_UTF_16__
19134 long i = __STDC_UTF_16__;
19135 #endif
19136 #ifdef __STDC_UTF_32__
19137 long j = __STDC_UTF_32__;
19138 #endif
19139 namespace test
19140 {
19141 using ::c16rtomb;
19142 using ::c32rtomb;
19143 using ::mbrtoc16;
19144 using ::mbrtoc32;
19145 }
19146
19147 int
19148 main ()
19149 {
19150
19151 ;
19152 return 0;
19153 }
19154 _ACEOF
19155 if ac_fn_cxx_try_compile "$LINENO"; then :
19156 ac_c11_uchar_cxx11=yes
19157 else
19158 ac_c11_uchar_cxx11=no
19159 fi
19160 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19161 else
19162 ac_c11_uchar_cxx11=no
19163 fi
19164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_c11_uchar_cxx11" >&5
19165 $as_echo "$ac_c11_uchar_cxx11" >&6; }
19166 if test x"$ac_c11_uchar_cxx11" = x"yes"; then
19167
19168 $as_echo "#define _GLIBCXX_USE_C11_UCHAR_CXX11 1" >>confdefs.h
19169
19170 fi
19171
19172 CXXFLAGS="$ac_save_CXXFLAGS"
19173 ac_ext=c
19174 ac_cpp='$CPP $CPPFLAGS'
19175 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19176 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19177 ac_compiler_gnu=$ac_cv_c_compiler_gnu
==================================
Configuring stage 2 in ./gcc
checking linker --sysroot support... no
checking __stack_chk_fail in target C library... checking for __stack_chk_fail... no
no __stack_chk_fail on this target
no
checking sys/sdt.h in the target C library... no
30110 # Test for stack protector support in target C library.
30111 { $as_echo "$as_me:${as_lineno-$LINENO}: checking __stack_chk_fail in target C library" >&5
30112 $as_echo_n "checking __stack_chk_fail in target C library... " >&6; }
30113 if ${gcc_cv_libc_provides_ssp+:} false; then :
30114 $as_echo_n "(cached) " >&6
30115 else
30116 gcc_cv_libc_provides_ssp=no
30117 if test "x$enable_libssp" = "xno"; then
30118 gcc_cv_libc_provides_ssp=yes
30119 elif test "x$enable_libssp" = "xyes"; then
30120 gcc_cv_libc_provides_ssp=no
30121 else
30122 case "$target" in
30123 *-*-musl*)
30124 # All versions of musl provide stack protector
30125 gcc_cv_libc_provides_ssp=yes;;
30126 *-*-linux* | *-*-kfreebsd*-gnu)
30127 # glibc 2.4 and later provides __stack_chk_fail and
30128 # either __stack_chk_guard, or TLS access to stack guard canary.
30129
30130 if test $glibc_version_major -gt 2 \
30131 || ( test $glibc_version_major -eq 2 && test $glibc_version_minor -ge 4 ); then :
30132 gcc_cv_libc_provides_ssp=yes
30133 else
30134
30135 if test -f $target_header_dir/features.h \
30136 && $EGREP '^[ ]*#[ ]*define[ ]+__GNU_LIBRARY__[ ]+([1-9][0-9]|[6-9])' \
30137 $target_header_dir/features.h > /dev/null; then
30138 if $EGREP '^[ ]*#[ ]*define[ ]+__UCLIBC__[ ]+1' \
30139 $target_header_dir/features.h > /dev/null && \
30140 test -f $target_header_dir/bits/uClibc_config.h && \
30141 $EGREP '^[ ]*#[ ]*define[ ]+__UCLIBC_HAS_SSP__[ ]+1' \
30142 $target_header_dir/bits/uClibc_config.h > /dev/null; then
30143 gcc_cv_libc_provides_ssp=yes
30144 fi
30145 # all versions of Bionic support stack protector
30146 elif test -f $target_header_dir/sys/cdefs.h \
30147 && $EGREP '^[ ]*#[ ]*define[ ]+__BIONIC__[ ]+1' \
30148 $target_header_dir/sys/cdefs.h > /dev/null; then
30149 gcc_cv_libc_provides_ssp=yes
30150 fi
30151 fi
30152 ;;
30153 *-*-gnu*)
30154 # Avoid complicated tests (see
30155 # <http://gcc.gnu.org/ml/gcc/2008-10/msg00130.html>) and for now
30156 # simply assert that glibc does provide this, which is true for all
30157 # realistically usable GNU/Hurd configurations.
30158 # All supported versions of musl provide it as well
30159 gcc_cv_libc_provides_ssp=yes;;
30160 *-*-darwin* | *-*-freebsd* | *-*-netbsd*)
30161 ac_fn_cxx_check_func "$LINENO" "__stack_chk_fail" "ac_cv_func___stack_chk_fail"
30162 if test "x$ac_cv_func___stack_chk_fail" = xyes; then :
30163 gcc_cv_libc_provides_ssp=yes
30164 else
30165 echo "no __stack_chk_fail on this target"
30166 fi
30167
30168 ;;
30169 *) gcc_cv_libc_provides_ssp=no ;;
30170 esac
30171 fi
30172 fi
30173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_libc_provides_ssp" >&5
30174 $as_echo "$gcc_cv_libc_provides_ssp" >&6; }
30175
30176 if test x$gcc_cv_libc_provides_ssp = xyes; then
30177
30178 $as_echo "#define TARGET_LIBC_PROVIDES_SSP 1" >>confdefs.h
30179
30180 fi
30181
30182 # Check whether --enable-default-ssp was given.
30183 # Check whether --enable-default-ssp was given.
30184 if test "${enable_default_ssp+set}" = set; then :
30185 enableval=$enable_default_ssp;
30186 if test x$gcc_cv_libc_provides_ssp = xyes; then
30187 case "$target" in
30188 ia64*-*-*) enable_default_ssp=no ;;
30189 *) enable_default_ssp=$enableval ;;
30190 esac
30191 else
30192 enable_default_ssp=no
30193 fi
30194 else
30195 enable_default_ssp=no
30196 fi
30197
30198 if test x$enable_default_ssp = xyes ; then
30199
30200 $as_echo "#define ENABLE_DEFAULT_SSP 1" >>confdefs.h
30201
30202 fi
30203
30204
30205 # Test for <sys/sdt.h> on the target.
30206
30207 { $as_echo "$as_me:${as_lineno-$LINENO}: checking sys/sdt.h in the target C library" >&5
30208 $as_echo_n "checking sys/sdt.h in the target C library... " >&6; }
30209 have_sys_sdt_h=no
30210 if test -f $target_header_dir/sys/sdt.h; then
30211 have_sys_sdt_h=yes
30212
30213 $as_echo "#define HAVE_SYS_SDT_H 1" >>confdefs.h
30214
30215 fi
30216 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_sys_sdt_h" >&5
30217 $as_echo "$have_sys_sdt_h" >&6; }
--
Greetings
Pete
Theory and practice are the same, in theory, but, in practice, they are different.
next reply other threads:[~2022-11-25 10:19 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-25 10:19 Peter Dyballa [this message]
2022-11-25 11:22 ` Jonathan Wakely
2022-11-25 11:29 ` Jonathan Wakely
2022-11-25 11:39 ` Jonathan Wakely
2022-11-25 11:30 ` Peter Dyballa
2022-11-25 15:56 ` Segher Boessenkool
2022-11-25 16:50 ` Peter Dyballa
2022-11-25 19:43 ` Segher Boessenkool
2022-11-28 22:05 ` Peter Dyballa
2022-11-30 23:09 ` Peter Dyballa
2022-12-01 8:22 ` Jonathan Wakely
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=F5B66C64-1021-4953-84AF-77E74CBDEDB9@Web.DE \
--to=peter_dyballa@web.de \
--cc=gcc-help@gcc.gnu.org \
/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).