Skip to content

Commit

Permalink
Select proper dsymutil for gcc 13
Browse files Browse the repository at this point in the history
  • Loading branch information
nobu committed Nov 7, 2023
1 parent f8456b6 commit 6031fdc
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions configure.ac
Expand Up @@ -426,7 +426,7 @@ AS_CASE(["$build_os"],
# default spec.
# Xcode linker warns for deprecated architecture and wrongly
# installed TBD files.
CC_WRAPPER=""
CC_WRAPPER="" CC_NO_WRAPPER="$CC"
echo 'int main(void) {return 0;}' > conftest.c
AS_IF([$CC -framework Foundation -o conftest conftest.c 2>&1 |
grep -e '^ld: warning: ignoring duplicate libraries:' \
Expand Down Expand Up @@ -1094,12 +1094,18 @@ main()
])
POSTLINK=""
AC_CHECK_PROGS(codesign, codesign)
AC_CHECK_PROGS(dsymutil, dsymutil)
dsymutils=
AS_CASE("$CC_NO_WRAPPER", [gcc*-1[[3-9]]], [
dsymutils=${CC_NO_WRAPPER@%:@gcc}
dsymutils=dsymutil${dsymutils%-1*}
dsymutils="$dsymutils-19 $dsymutils-18 $dsymutils-17"
])
AC_CHECK_PROGS(dsymutil, $dsymutils dsymutil)
AS_IF([test -n "$codesign"], [
POSTLINK="{ test -z '\$(RUBY_CODESIGN)' || $codesign -s '\$(RUBY_CODESIGN)' -f \$@; }${POSTLINK:+; $POSTLINK}"
])
AS_IF([test -n "$dsymutil"], [
POSTLINK="$dsymutil \$@${POSTLINK:+; $POSTLINK}"
POSTLINK="$dsymutil \$@ 2>/dev/null${POSTLINK:+; $POSTLINK}"
])
AS_IF([test -n "${POSTLINK}"], [
LINK_SO="$LINK_SO
Expand Down

0 comments on commit 6031fdc

Please sign in to comment.