Skip to content

Commit 7de1286

Browse files
committed
[GR-63069] Fix libffi warnings on Darwin
PullRequest: graal/20299
2 parents f5f9328 + 579813d commit 7de1286

File tree

2 files changed

+59
-4
lines changed

2 files changed

+59
-4
lines changed

truffle/mx.truffle/mx_truffle.py

+7-4
Original file line numberDiff line numberDiff line change
@@ -1670,10 +1670,13 @@ def getArchivableResults(self, use_relpath=True, single=False):
16701670
os.path.join(self.out_dir, 'libffi-3.4.6'))
16711671
configure_args = ['--disable-dependency-tracking',
16721672
'--disable-shared',
1673-
'--with-pic',
1674-
' CFLAGS="{}"'.format(' '.join(['-g', '-O3', '-fvisibility=hidden'] + (['-m64'] if mx.get_os() == 'solaris' else []))),
1675-
'CPPFLAGS="-DNO_JAVA_RAW_API"',
1676-
]
1673+
'--with-pic']
1674+
1675+
if mx.get_os() == 'darwin':
1676+
configure_args += ['--disable-multi-os-directory']
1677+
1678+
configure_args += [' CFLAGS="{}"'.format(' '.join(['-g', '-O3', '-fvisibility=hidden'] + (['-m64'] if mx.get_os() == 'solaris' else []))),
1679+
'CPPFLAGS="-DNO_JAVA_RAW_API"']
16771680

16781681
self.delegate.buildEnv = dict(
16791682
SOURCES=os.path.basename(self.delegate.dir),
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
From 77b8644bd3ebb043bfd2c46ef5f4c409b0b597cc Mon Sep 17 00:00:00 2001
2+
From: Bernhard Urban-Forster <[email protected]>
3+
Date: Thu, 13 Mar 2025 20:46:22 +0100
4+
Subject: [PATCH] gcc -g produces .dSYM directories on Darwin
5+
6+
Workaround to get rid of this warning:
7+
```
8+
rm: conftest.dSYM: is a directory
9+
```
10+
11+
Can be removed once libffi packages their tarballs with a recent enough `automake`, see:
12+
- GR-63069
13+
- https://github.com/autotools-mirror/automake/commit/cb537c9f1de660e6d7b269179f9406cd24ab5a36
14+
15+
---
16+
configure | 6 +++---
17+
1 file changed, 3 insertions(+), 3 deletions(-)
18+
19+
diff --git a/configure b/configure
20+
index bcbbd44..f651133 100755
21+
--- a/configure
22+
+++ b/configure
23+
@@ -5063,7 +5063,7 @@ _ACEOF
24+
break
25+
fi
26+
done
27+
- rm -f core conftest*
28+
+ rm -rf core conftest*
29+
unset am_i
30+
fi
31+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
32+
@@ -6667,7 +6667,7 @@ else $as_nop
33+
if $GREP 'External.*some_variable' conftest.out > /dev/null; then
34+
lt_cv_nm_interface="MS dumpbin"
35+
fi
36+
- rm -f conftest*
37+
+ rm -rf conftest*
38+
fi
39+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
40+
printf "%s\n" "$lt_cv_nm_interface" >&6; }
41+
@@ -7776,7 +7776,7 @@ then :
42+
rm -f conftest.* libconftest.a
43+
44+
fi
45+
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
46+
+rm -rf core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
47+
48+
fi
49+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
50+
--
51+
2.48.1
52+

0 commit comments

Comments
 (0)