reduced required changes for building on mac to solely creating fake empty static libraries with touch (because Apples ar errors out when trying to create an empty static library)

This commit is contained in:
Christopher Friedt 2016-04-29 13:46:00 -04:00
parent a3b756c312
commit d49ca4bfd7
3 changed files with 3 additions and 138 deletions

View File

@ -92,19 +92,10 @@ binutils-$(BINUTILS_VER)/.mcm_extracted: $(SOURCES)/binutils-$(BINUTILS_VER).tar
binutils-$(BINUTILS_VER)/.mcm_configured: binutils-$(BINUTILS_VER)/.mcm_extracted
test -e binutils-$(BINUTILS_VER)/config.status || ( cd binutils-$(BINUTILS_VER) && ./configure $(BINUTILS_CONFIG) )
ifeq ($(shell uname),Darwin)
echo '#define HAVE_STDLIB_H 1' >> binutils-$(BINUTILS_VER)/libiberty/config.h
echo '#define HAVE_LIMITS_H 1' >> binutils-$(BINUTILS_VER)/libiberty/config.h
echo '#define HAVE_STRING_H 1' >> binutils-$(BINUTILS_VER)/libiberty/config.h
echo '#define HAVE_SYS_TYPES_H 1' >> binutils-$(BINUTILS_VER)/libiberty/config.h
echo '#define HAVE_SYS_STAT_H 1' >> binutils-$(BINUTILS_VER)/libiberty/config.h
echo '#define HAVE_UNISTD_H 1' >> binutils-$(BINUTILS_VER)/libiberty/config.h
echo '#define HAVE_FCNTL_H 1' >> binutils-$(BINUTILS_VER)/libiberty/config.h
endif
touch $@
binutils-$(BINUTILS_VER)/.mcm_built: binutils-$(BINUTILS_VER)/.mcm_configured
$(MAKE) -C binutils-$(BINUTILS_VER)
cd binutils-$(BINUTILS_VER) && $(MAKE)
touch $@
binutils-$(BINUTILS_VER)/.mcm_installed: binutils-$(BINUTILS_VER)/.mcm_built
@ -118,16 +109,6 @@ gcc-$(GCC_VER)/.mcm_extracted: $(SOURCES)/gcc-$(GCC_VER).tar.bz2 $(SOURCES)/conf
tar jxvf $<
cat patches/gcc-$(GCC_VER)/* | ( cd gcc-$(GCC_VER) && patch -p1 )
cp $(SOURCES)/config.sub gcc-$(GCC_VER)
ifeq ($(shell uname),Darwin)
echo '#define HAVE_STDLIB_H 1' >> gcc-$(GCC_VER)/libiberty/config.in
echo '#define HAVE_LIMITS_H 1' >> gcc-$(GCC_VER)/libiberty/config.in
echo '#define HAVE_STRING_H 1' >> gcc-$(GCC_VER)/libiberty/config.in
echo '#define HAVE_SYS_TYPES_H 1' >> gcc-$(GCC_VER)/libiberty/config.in
echo '#define HAVE_SYS_STAT_H 1' >> gcc-$(GCC_VER)/libiberty/config.inø
echo '#define HAVE_UNISTD_H 1' >> gcc-$(GCC_VER)/libiberty/config.in
echo '#define HAVE_FCNTL_H 1' >> gcc-$(GCC_VER)/gcc/auto-host.h
echo '#define HAVE_SYS_PARAM_H 1' >> gcc-$(GCC_VER)/gcc/auto-host.h
endif
touch $@
gcc-$(GCC_VER)/build0/.mcm_configured: gcc-$(GCC_VER)/.mcm_extracted | binutils-$(BINUTILS_VER)/.mcm_installed

View File

@ -1,115 +0,0 @@
diff --git a/libgomp/configure b/libgomp/configure
index af4254c..eee4673 100755
--- a/libgomp/configure
+++ b/libgomp/configure
@@ -8462,110 +8462,6 @@ fi
# ----------------- done all checks, emit header -------------
ac_config_commands="$ac_config_commands gstdint.h"
-
-
-
-# Check to see if -pthread or -lpthread is needed. Prefer the former.
-# In case the pthread.h system header is not found, this test will fail.
-XPCFLAGS=""
-CFLAGS="$CFLAGS -pthread"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <pthread.h>
- void *g(void *d) { return NULL; }
-int
-main ()
-{
-pthread_t t; pthread_create(&t,NULL,g,NULL);
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- XPCFLAGS=" -Wc,-pthread"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-CFLAGS="$save_CFLAGS" LIBS="-lpthread $LIBS"
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <pthread.h>
- void *g(void *d) { return NULL; }
-int
-main ()
-{
-pthread_t t; pthread_create(&t,NULL,g,NULL);
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- :
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-{ { echo "$as_me:$LINENO: error: Pthreads are required to build libgomp" >&5
-echo "$as_me: error: Pthreads are required to build libgomp" >&2;}
- { (exit 1); exit 1; }; }
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-
# Check for functions needed.

View File

@ -2,13 +2,12 @@ diff --git a/Makefile b/Makefile
index ec54880..b048cbd 100644
--- a/Makefile
+++ b/Makefile
@@ -170,7 +170,12 @@ lib/libc.a: $(AOBJS)
@@ -170,7 +170,11 @@ lib/libc.a: $(AOBJS)
$(EMPTY_LIBS):
rm -f $@
+ifeq ($(shell uname),Darwin)
+ touch .empty.o
+ $(AR) rc $@ .empty.o
+ touch $@
+else
$(AR) rc $@
+endif