Skip to content

[Cherry Pick] lock: Avoid use of undefined DISPATCH_INTERNAL_CRASH #241

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

Merged
merged 1 commit into from
May 5, 2017

Conversation

ffried
Copy link

@ffried ffried commented Apr 21, 2017

This fixes the issues described in #233 for Swift 3.1.x

Building swift-corelibs-libdispatch on powerpc64le under Linux lead to
the following build failure:

	/bin/bash ../libtool  --tag=CXX   --mode=compile /home/ubuntu/swift-dev/build/buildbot_incremental/llvm-linux-powerpc64le/bin/clang++ -DHAVE_CONFIG_H -I. -I../config  -I.. -I.. -I../private -DDISPATCH_USE_DTRACE=0 -I../libpwq/include -Wall -fvisibility=hidden -momit-leaf-frame-pointer  -isystem /usr/include/bsd -DLIBBSD_OVERLAY  -fblocks -I../src/BlocksRuntime -std=gnu++11 -fno-exceptions -O2 -c -o libdispatch_la-block.lo `test -f 'block.cpp' || echo './'`block.cpp
	libtool: compile:  /home/ubuntu/swift-dev/build/buildbot_incremental/llvm-linux-powerpc64le/bin/clang++ -DHAVE_CONFIG_H -I. -I../config -I.. -I.. -I../private -DDISPATCH_USE_DTRACE=0 -I../libpwq/include -Wall -fvisibility=hidden -momit-leaf-frame-pointer -isystem /usr/include/bsd -DLIBBSD_OVERLAY -fblocks -I../src/BlocksRuntime -std=gnu++11 -fno-exce
	ptions -O2 -c block.cpp  -fPIC -DPIC -o .libs/libdispatch_la-block.o
	In file included from block.cpp:32:
	In file included from ./internal.h:628:
	In file included from ./shims.h:171:
	./shims/lock.h:550:3: error: use of undeclared identifier 'DISPATCH_INTERNAL_CRASH'
			DISPATCH_INTERNAL_CRASH(errno, "sys_membarrier not supported");
			^
	1 error generated.
	Makefile:701: recipe for target 'libdispatch_la-block.lo' failed
	make[2]: *** [libdispatch_la-block.lo] Error 1
	make[2]: Leaving directory '/home/ubuntu/swift-dev/swift-corelibs-libdispatch/src'
	Makefile:541: recipe for target 'all' failed
	make[1]: *** [all] Error 2
	make[1]: Leaving directory '/home/ubuntu/swift-dev/swift-corelibs-libdispatch/src'
	Makefile:457: recipe for target 'all-recursive' failed
	make: *** [all-recursive] Error 1

Include ordering in internal.h is tightly constrained, so open-code the macro
to avoid the dependency problem.

Signed-off-by: Andrew Jeffery <[email protected]>
@MadCoder MadCoder merged commit 9dbadc1 into swiftlang:swift-3.1-branch May 5, 2017
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.

3 participants