diff options
-rw-r--r-- | Makefile.in | 2 | ||||
-rwxr-xr-x | ports/linux/subports | 16 |
2 files changed, 14 insertions, 4 deletions
diff --git a/Makefile.in b/Makefile.in index 6aa4659..d5a78b5 100644 --- a/Makefile.in +++ b/Makefile.in @@ -134,7 +134,7 @@ tables: enums/*.in maketables templatefile.py $(TABLES) ./maketables enums/*.in wrappers: makewrappers templatefile.py $(TEMPLATES) ports/*/wrapfuncs.in - ./makewrappers "xattr=$(XATTR)" + CC="$(CC) $(CFLAGS) $(CFLAGS_PSEUDO)" ./makewrappers "xattr=$(XATTR)" .SECONDARY: tables wrappers diff --git a/ports/linux/subports b/ports/linux/subports index 94d43e7..507794e 100755 --- a/ports/linux/subports +++ b/ports/linux/subports @@ -1,11 +1,11 @@ #!/bin/sh found=false -printf >&2 "Checking for old/new clone mechanics..." +printf >&2 "Checking for old/new clone mechanics... " cat > dummy.c <<EOF #include <sched.h> int clone(int (*fn)(void *), void *child_stack, int flags, void *arg, ...) { return 0; } EOF -if cc -c -o dummy.o dummy.c >/dev/null 2>&1; then +if ${CC} -c -o dummy.o dummy.c >/dev/null 2>&1; then rm -f dummy.c dummy.o echo >&2 "New clone." echo "linux/newclone" @@ -15,7 +15,7 @@ cat > dummy.c <<EOF #include <sched.h> int clone(int (*fn)(void *), void *child_stack, int flags, void *arg) { return 0; } EOF -if ! $found && cc -c -o dummy.o dummy.c >/dev/null 2>&1; then +if ! $found && ${CC} -c -o dummy.o dummy.c >/dev/null 2>&1; then rm -f dummy.c dummy.o echo >&2 "Old clone." echo "linux/oldclone" @@ -27,7 +27,17 @@ if ! $found; then fi if $port_xattr; then + cat > dummy.c <<EOF +#include <sys/types.h> +#include <attr/xattr.h> +int i; +EOF + if ! ${CC} -c -o dummy.o dummy.c >/dev/null 2>&1; then + echo >&2 "Warning: Can't compile trivial program using <attr/xattr.h>". + echo >&2 " xattr support will require that header." + fi echo "linux/xattr" else echo "linux/noxattr" fi +rm -f dummy.c dummy.o |