Skip to content

Commit

Permalink
Ignore duplicate libraries warnings from gcc 13
Browse files Browse the repository at this point in the history
  • Loading branch information
nobu committed Nov 7, 2023
1 parent e7bdd9e commit f8456b6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
7 changes: 5 additions & 2 deletions configure.ac
Expand Up @@ -421,13 +421,16 @@ AC_SUBST(COUTFLAG)
AC_SUBST(CSRCFLAG)

AS_CASE(["$build_os"],
[darwin1*.*], [
[darwin*], [
# gcc 13 warns duplicate -l options, which are added by the
# default spec.
# Xcode linker warns for deprecated architecture and wrongly
# installed TBD files.
CC_WRAPPER=""
echo 'int main(void) {return 0;}' > conftest.c
AS_IF([$CC -framework Foundation -o conftest conftest.c 2>&1 |
grep '^ld: warning: text-based stub file' >/dev/null], [
grep -e '^ld: warning: ignoring duplicate libraries:' \
-e '^ld: warning: text-based stub file' >/dev/null], [
CC_WRAPPER=`cd -P "${tooldir}" && pwd`/darwin-cc
CC="$CC_WRAPPER $CC"
])
Expand Down
1 change: 1 addition & 0 deletions tool/darwin-cc
Expand Up @@ -2,5 +2,6 @@
exec 2> >(exec grep -v \
-e '^ld: warning: The [a-z0-9_][a-z0-9_]* architecture is deprecated for macOS' \
-e '^ld: warning: text-based stub file /System/Library/Frameworks/' \
-e '^ld: warning: ignoring duplicate libraries:' \
>&2)
exec "$@"

0 comments on commit f8456b6

Please sign in to comment.