void-packages/srcpkgs/ck/patches/cross.patch

30 lines
647 B
Diff
Raw Normal View History

2019-11-25 14:44:39 +01:00
--- configure.orig
+++ configure
@@ -636,10 +636,11 @@
}
EOF
-$CC -o .1 .1.c
-COMPILER=`./.1 2> /dev/null`
-r=$?
-rm -f .1.c .1
+r=1
+case "`$CC --version`" in
+*clang*) COMPILER=clang; r=0 ;;
+*GCC*) COMPILER=gcc; r=0 ;;
+esac
if test "$r" -ne 0; then
assert "" "update compiler"
--- src/Makefile.in.orig
+++ src/Makefile.in
@@ -25,7 +25,7 @@
$(LD) $(LDFLAGS) -o $(TARGET_DIR)/libck.so $(OBJECTS)
libck.a: $(OBJECTS)
- ar rcs $(TARGET_DIR)/libck.a $(OBJECTS)
+ $(AR) rcs $(TARGET_DIR)/libck.a $(OBJECTS)
ck_array.o: $(INCLUDE_DIR)/ck_array.h $(SDIR)/ck_array.c
$(CC) $(CFLAGS) -c -o $(TARGET_DIR)/ck_array.o $(SDIR)/ck_array.c