brew config AND brew doctor output OR brew gist-logs <formula> link
Verification
What were you trying to do (and why)?
The GCC patches (for v16 and recent patch releases) do the following
|
+/* Default architecture to use if -mcpu=native did not detect a known CPU. */ |
|
+#if TARGET_MACHO |
|
+#define DEFAULT_ARCH "apple-m1" |
|
+#else |
|
+#define DEFAULT_ARCH "8A" |
|
+#define DEFAULT_CPU "generic-armv8-a" |
|
+#endif |
i.e. define DEFAULT_CPU conditionally, while leaving codepaths elsewhere in that TU that require DEFAULT_CPU to be set unconditionally (or, more specifically, guarded by #if defined(__APPLE__), which is not equivalent to #if TARGET_MACHO).
This makes it impossible to build cross-compilers targetting darwin from linux, as we're doing (among other things) in conda-forge.
CC @fxcoudert for #287916
PS. Sorry for having to "lie" in the issue template; this is not directly a brew issue, but still belongs in this repo.
What happened (include all command output)?
GCC with homebrew patches applied should still compile under all circumstances.
What did you expect to happen?
GCC compiles successfully
Step-by-step reproduction instructions (by running brew commands)
brew configANDbrew doctoroutput ORbrew gist-logs <formula>linkVerification
brew doctoroutput saysYour system is ready to brew.and am still able to reproduce my issue.brew updateand am still able to reproduce my issue.brew doctorand that did not fix my problem.What were you trying to do (and why)?
The GCC patches (for v16 and recent patch releases) do the following
homebrew-core/Patches/gcc/gcc-16.1.0.diff
Lines 3187 to 3193 in 76b7fd6
i.e. define
DEFAULT_CPUconditionally, while leaving codepaths elsewhere in that TU that requireDEFAULT_CPUto be set unconditionally (or, more specifically, guarded by#if defined(__APPLE__), which is not equivalent to#if TARGET_MACHO).This makes it impossible to build cross-compilers targetting darwin from linux, as we're doing (among other things) in conda-forge.
CC @fxcoudert for #287916
PS. Sorry for having to "lie" in the issue template; this is not directly a brew issue, but still belongs in this repo.
What happened (include all command output)?
GCC with homebrew patches applied should still compile under all circumstances.
What did you expect to happen?
GCC compiles successfully
Step-by-step reproduction instructions (by running
brewcommands)