From: "Rebecca Cran" <rebecca@bsdio.com>
To: "devel@edk2.groups.io" <devel@edk2.groups.io>,
Andrew Fish <afish@apple.com>,
"Kinney, Michael D" <michael.d.kinney@intel.com>
Subject: BaseTools no longer builds on macOS: "error: unknown warning option '-Werror=stringop-overflow'"
Date: Thu, 25 Aug 2022 10:20:45 -0600 [thread overview]
Message-ID: <af477e76-7d10-8d5c-cbbd-2df2aaf01747@bsdio.com> (raw)
BaseTools no longer builds on macOS (12.5.1, Monterey), because 'gcc' in
/usr/bin is really clang.
I tried installing gcc 12 from Homebrew, but the build then failed
saying it couldn't find _stdio.h.
It appears the breakage might have been introduced in this commit back
in March:
commit 22130dcd98b4d4b76ac8d922adb4a2dbc86fa52c
Author: Gerd Hoffmann <kraxel@redhat.com>
Date: Thu Mar 24 20:04:36 2022 +0800
Basetools: turn off gcc12 warning
Running "make -C BaseTools" produces the following error:
/Library/Developer/CommandLineTools/usr/bin/make -C DevicePath
gcc -c -I .. -I ../Include/Common -I ../Include/ -I
../Include/IndustryStandard -I ../Common/ -I .. -I . -I ../Include/X64/
-MD -fshort-wchar -fno-strict-aliasing -Wall -Werror
-Wno-deprecated-declarations -Wno-self-assign -Wno-unused-result
-nostdlib -g -O2 -Wno-error=stringop-overflow DevicePath.c -o DevicePath.o
error: unknown warning option '-Werror=stringop-overflow'; did you mean
'-Werror=shift-overflow'? [-Werror,-Wunknown-warning-option]
make[2]: *** [DevicePath.o] Error 1
make[1]: *** [DevicePath] Error 2
make: *** [Source/C] Error 2
bcran@procan edk2 % gcc -v
Configured with: --prefix=/Library/Developer/CommandLineTools/usr
--with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
Apple clang version 12.0.5 (clang-1205.0.22.9)
Target: x86_64-apple-darwin21.6.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
bcran@procan edk2 % uname -a
Darwin procan.int.bsdio.com 21.6.0 Darwin Kernel Version 21.6.0: Wed Aug
10 14:25:27 PDT 2022; root:xnu-8020.141.5~2/RELEASE_X86_64 x86_64
--
Rebecca Cran
next reply other threads:[~2022-08-25 16:20 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-25 16:20 Rebecca Cran [this message]
2022-08-25 17:45 ` BaseTools no longer builds on macOS: "error: unknown warning option '-Werror=stringop-overflow'" Andrew Fish
[not found] ` <170EA793884203D0.22386@groups.io>
2022-08-25 17:49 ` [edk2-devel] " Andrew Fish
2022-08-25 23:13 ` Rebecca Cran
2022-08-25 23:51 ` Michael D Kinney
2022-08-26 1:53 ` 回复: " gaoliming
2022-08-26 7:32 ` Rebecca Cran
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-list 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=af477e76-7d10-8d5c-cbbd-2df2aaf01747@bsdio.com \
--to=devel@edk2.groups.io \
/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