[Bug target/87243] FSF GCC needs to do something special (like using xcrun) on darwin18 to find system headers in SDK

2019-09-26 Thread ken.cunningham.webuse at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87243

Ken Cunningham  changed:

   What|Removed |Added

 CC||ken.cunningham.webuse@gmail
   ||.com

--- Comment #6 from Ken Cunningham  ---
I would suggest that, if not using xcrun (which I understand completely), then
some replication of the logic it uses in darwin's driver would make sense.

An knowledgeable person explained this to me regarding how xcrun finds the SDK:

If -isysroot is on the command line, it is used. Otherwise ...
If system headers are installed, they are used (no sysroot is set). Otherwise
...
If xcrun finds a major-version matching SDK in the selected in
/Library/Developer/SDKs, it will use it. Otherwise ...
If xcrun finds a macosx SDK in the selected Xcode.app or in
/Library/Developer/SDKs, it will use it.
xcrun does not explicitly set the command line arguments. It sets the SDKROOT
envvar, which CFE honors as the default isysroot if set.


This was later updated to change the SDK search path to
/Library/Developer/CommandLineTools/SDKs, which is the one that is working now
on 10.14.

The only thing I would add to that would be that it would probably be quite
desirable to have ${SDKROOT} respected if it has been set by the user, so a
specific SDK can be forced globally.

The way the CFE then uses the ${SDKROOT} internally is here:

https://clang.llvm.org/doxygen/Darwin_8cpp_source.html

[Bug bootstrap/92061] New: build of gencondmd fails with clang-9.0 (trunk, gcc 9.2.1, probably other older versions of gcc as yet untested) with undefined symbols for ix86_binary_operator_ok and relat

2019-10-10 Thread ken.cunningham.webuse at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92061

Bug ID: 92061
   Summary: build of gencondmd fails with clang-9.0 (trunk, gcc
9.2.1, probably other older versions of gcc as yet
untested) with undefined symbols for
ix86_binary_operator_ok and related.
   Product: gcc
   Version: 10.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: bootstrap
  Assignee: unassigned at gcc dot gnu.org
  Reporter: ken.cunningham.webuse at gmail dot com
  Target Milestone: ---

See also <https://trac.macports.org/ticket/59253>

bootstrapping gcc-9.2.1 or gcc-devel (6 Oct 2019) with clang-9.0 fails due to:


/opt/local/bin/clang++-mp-9.0 -arch x86_64 -std=gnu++98   -g  -DIN_GCC   
-fno-strict-aliasing -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W
-Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-error=format-diag
-Wno-format -Wmissing-format-attribute -Woverloaded-virtual -pedantic
-Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -fno-common 
-DHAVE_CONFIG_H  -DGENERATOR_FILE -fno-PIE -Wl,-no_pie -L/opt/local/lib
-Wl,-headerpad_max_install_names
-Wl,-syslibroot,/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk
-no-pie -o build/gencondmd \
build/gencondmd.o build/errors.o
../build-x86_64-apple-darwin18/libiberty/libiberty.a
clang: warning: argument unused during compilation: '-no-pie'
[-Wunused-command-line-argument]
Undefined symbols for architecture x86_64:
  "ix86_binary_operator_ok(rtx_code, machine_mode, rtx_def**)", referenced
from:
  ___cxx_global_var_init.100 in gencondmd.o
  "optimize_function_for_size_p(function*)", referenced from:
  ___cxx_global_var_init.100 in gencondmd.o
  "_cfun", referenced from:
  ___cxx_global_var_init.100 in gencondmd.o
  "_const_tiny_rtx", referenced from:
  ___cxx_global_var_init.100 in gencondmd.o
  "_epilogue_completed", referenced from:
  ___cxx_global_var_init.100 in gencondmd.o
  "_flag_cf_protection", referenced from:
  ___cxx_global_var_init.100 in gencondmd.o
  "_flag_excess_precision", referenced from:
  ___cxx_global_var_init.100 in gencondmd.o
  "_flag_finite_math_only", referenced from:
  ___cxx_global_var_init.100 in gencondmd.o
  "_flag_fp_int_builtin_inexact", referenced from:
  ___cxx_global_var_init.100 in gencondmd.o
  "_flag_peephole2", referenced from:
  ___cxx_global_var_init.100 in gencondmd.o
  "_flag_pic", referenced from:
  ___cxx_global_var_init.100 in gencondmd.o
  "_flag_rounding_math", referenced from:
  ___cxx_global_var_init.100 in gencondmd.o
  "_flag_trapping_math", referenced from:
  ___cxx_global_var_init.100 in gencondmd.o
  "_flag_unsafe_math_optimizations", referenced from:
  ___cxx_global_var_init.100 in gencondmd.o
  "_insn", referenced from:
  ___cxx_global_var_init.100 in gencondmd.o
  "_ix86_arch_features", referenced from:
  ___cxx_global_var_init.100 in gencondmd.o
  "_ix86_cmodel", referenced from:
  ___cxx_global_var_init.100 in gencondmd.o
  "_ix86_fpmath", referenced from:
  ___cxx_global_var_init.100 in gencondmd.o
  "_ix86_isa_flags", referenced from:
  ___cxx_global_var_init.100 in gencondmd.o
  "_ix86_isa_flags2", referenced from:
  ___cxx_global_var_init.100 in gencondmd.o
  "_ix86_pmode", referenced from:
  ___cxx_global_var_init.100 in gencondmd.o
  "_ix86_tls_dialect", referenced from:
  ___cxx_global_var_init.100 in gencondmd.o
  "_ix86_tune_features", referenced from:
  ___cxx_global_var_init.100 in gencondmd.o
  "_operands", referenced from:
  ___cxx_global_var_init.100 in gencondmd.o
  "_optimize", referenced from:
  ___cxx_global_var_init.100 in gencondmd.o
  "_reload_completed", referenced from:
  ___cxx_global_var_init.100 in gencondmd.o
  "_reload_in_progress", referenced from:
  ___cxx_global_var_init.100 in gencondmd.o
  "_rtx_class", referenced from:
  ___cxx_global_var_init.100 in gencondmd.o
  "_target_flags", referenced from:
  ___cxx_global_var_init.100 in gencondmd.o
  "_x86_prefetch_sse", referenced from:
  ___cxx_global_var_init.100 in gencondmd.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[3]: *** [build/gencondmd] Error 1



bootstrapping with clang-8.0 succeeds, but with many warnings at the same point
in the build that look like this:


In file included from build/gencondmd.c:24:
5  
/opt/local/var/macports/build/_opt_macports-ports_lang_gcc9/gcc9/work/gcc-9.2.0/gcc/coretypes.h:76:1

[Bug target/92061] build of gencondmd fails with clang-9.0 (trunk, gcc 9.2.1, probably other older versions of gcc as yet untested) with undefined symbols for ix86_binary_operator_ok and related.

2019-10-11 Thread ken.cunningham.webuse at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92061

--- Comment #4 from Ken Cunningham  ---
Thanks for the quick analysis. For now we blacklisted clang > 8.x from building
gcc, while we wait to see what happens with this.

[Bug target/117834] [14/15 Regression] libgfortran doesn't compile unless `PTHREAD_RWLOCK_INITIALIZER` is defined on powerpc-darwin since r14-6425

2024-12-06 Thread ken.cunningham.webuse at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117834

Ken Cunningham  changed:

   What|Removed |Added

 CC||ken.cunningham.webuse@gmail
   ||.com

--- Comment #10 from Ken Cunningham  ---
I keep thonking Tiger is dead, but keen users still keep coming around
regularly with desires for newer compilers and fix requests for build errors….
so we’ll patch it in MacPorts and carry it there for a while.

There is a tiny bit more to the patch as this also needs to be defined and
isn’t on Tiger:

_PTHREAD_RWLOCK_SIG_init

The users pushing for this know that someone needs to run the gcc test suite on
Tiger at times and pass along results to Iain at least.