Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(configure): Correctly detect visibility("hidden") support on Darwin #461

Conversation

mbektchiev
Copy link
Contributor

@mbektchiev mbektchiev commented Dec 19, 2018

When performing this test on macOS High Sierra:

echo 'int __attribute__ ((visibility ("hidden"))) foo (void) { return 1  ; }' > conftest.c
gcc -Werror -S conftest.c -o conftest.s;
cat conftest.s

I get the following output:

	.section	__TEXT,__text,regular,pure_instructions
	.macosx_version_min 10, 13
	.private_extern	_foo            ## -- Begin function foo
	.globl	_foo
	.p2align	4, 0x90
_foo:                                   ## @foo
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movl	$1, %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function

.subsections_via_symbols
$ gcc -v
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 10.0.0 (clang-1000.11.45.5)
Target: x86_64-apple-darwin17.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

@tromey
Copy link
Member

tromey commented Dec 19, 2018

Thank you.

@tromey tromey merged commit 8fa8837 into libffi:master Dec 19, 2018
@mbektchiev mbektchiev deleted the bektchiev/fix-visibility-hidden-check-in-configure branch December 20, 2018 07:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants