COMPILER=ports-clang and clang's builtin headers

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

COMPILER=ports-clang and clang's builtin headers

Lauri Tirkkonen-2
[resending this as apparently my previous message sent on Sunday was

Hi, I've been using 'fastboot' from android platform_system_core lately
(built by by borrowing some stuff from FreeBSD's port) and figured it'd
be nice to create an actual port out of it. So I did a bit of work
towards that goal.

However, while this piece of software builds just fine manually using
ports clang, it doesn't when using the ports infrastructure to build it.
The reason for that is that it uses stdatomic.h, a header not present in
base, provided by clang in its builtin include path
/usr/local/lib/clang/7.0.1/include -- adds -nostdinc if
DESTDIR is defined, and that removes this include dir.

Is there some reasonable way to add this include dir back for the port
compilation, preferably without hardcoding the ports clang version
(which is part of the path)? Has anyone else encountered this problem?

Lauri Tirkkonen | lotheac @ IRCnet