mirror of
https://github.com/Relintai/osxcross.git
synced 2025-03-09 07:46:59 +01:00
add a no-op dsymutil shell script to bypass dsymutil invocation errors in a more simple way (fixes https://github.com/tpoechtrager/osxcross/issues/1)
remove the gcc dsymutil patch (no longer needed)
This commit is contained in:
parent
71f25f382b
commit
99a8ee449f
@ -15,7 +15,7 @@ If you want, then you can build an up-to-date vanilla GCC as well.
|
||||
|
||||
### WHAT IS NOT WORKING (YET)? ###
|
||||
|
||||
* Debug info is weak because of the [missing](https://github.com/tpoechtrager/osxcross/blob/master/patches/gcc-dsymutil.patch)
|
||||
* Debug info is weak because of the [missing](https://github.com/tpoechtrager/osxcross/blob/master/oclang/dsymutil)
|
||||
[`dsymutil`](http://www.manpagez.com/man/1/dsymutil) (debugger shows only function names).
|
||||
The source code of dsymutil is not publicly available, so it can't be ported to other platforms.
|
||||
But you probably don't want debug symbols anyway if you build on a non OS X system.
|
||||
|
2
build.sh
2
build.sh
@ -208,6 +208,8 @@ popd &>/dev/null
|
||||
|
||||
popd &>/dev/null
|
||||
|
||||
cp -f oclang/dsymutil $TARGET_DIR/bin
|
||||
|
||||
WRAPPER=$TARGET_DIR/bin/x86_64-apple-$TARGET-oclang
|
||||
cp -f oclang/oclang $WRAPPER
|
||||
|
||||
|
@ -46,8 +46,6 @@ pushd gcc*$GCC_VERSION* &>/dev/null
|
||||
rm -f $OSXCROSS_TARGET_DIR/bin/*-gcc*
|
||||
rm -f $OSXCROSS_TARGET_DIR/bin/*-g++*
|
||||
|
||||
patch -p0 < $OSXCROSS_PATCH_DIR/gcc-dsymutil.patch
|
||||
|
||||
mkdir -p build
|
||||
pushd build &>/dev/null
|
||||
|
||||
|
20
oclang/dsymutil
Executable file
20
oclang/dsymutil
Executable file
@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# No-op script to bypass dsymutil invocation errors
|
||||
#
|
||||
# Please see:
|
||||
# https://github.com/tpoechtrager/osxcross/issues/1
|
||||
# https://github.com/tpoechtrager/osxcross/pull/2
|
||||
#
|
||||
|
||||
if [ $# -eq 0 ] || [ -n "$OSXCROSS_SHOW_DSYMUTIL_INVOCATION" ]; then
|
||||
NAME_OF_PARENT_PROCESS=`basename \`ps -ocommand= -p $PPID 2>/dev/null | awk '{print $1}'\``
|
||||
|
||||
echo -en "\e[1mosxcross \e[35mwarning:\e[0m\e[1m dsymutil invocation is a no-op (dsymutil $@) "
|
||||
|
||||
if [ -n "$NAME_OF_PARENT_PROCESS" ]; then
|
||||
echo -e "(invoked by $NAME_OF_PARENT_PROCESS)\e[0m" 1>&2
|
||||
else
|
||||
echo -e "\e[0m" 1>&2
|
||||
fi
|
||||
fi
|
@ -50,9 +50,6 @@ if [ $# -gt 0 ]; then
|
||||
if [ "$p" == "-stdlib=libc++" ]; then
|
||||
USE_LIBCXX=2
|
||||
fi
|
||||
# if [[ "$p" == -g* ]] && [ "$p" != "-g0" ] && [ "$p" != "-ggdb0" ]; then
|
||||
# echo -e "\e[1mosxcross \e[35mwarning:\e[0m\e[1m replacing '$p' with '-g0'\e[0m" 1>&2
|
||||
# fi
|
||||
done
|
||||
fi
|
||||
|
||||
@ -101,9 +98,9 @@ if [ $? -eq 0 ] && [ ! -f "$XMMINTRIN" ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
$COMPILER $OSXCROSS_TARGET_OPTION $TARGET -isysroot $OSXCROSS_SDK \
|
||||
$CPLUSINC \
|
||||
$OSX_VERSION_MIN_OPT -mlinker-version=$OSXCROSS_LINKER_VERSION $OSXCROSS_OPT_ARGS \
|
||||
${1+"$@"} -g0
|
||||
$COMPILER \
|
||||
$OSXCROSS_TARGET_OPTION $TARGET -isysroot $OSXCROSS_SDK \
|
||||
$CPLUSINC $OSX_VERSION_MIN_OPT -mlinker-version=$OSXCROSS_LINKER_VERSION \
|
||||
$OSXCROSS_OPT_ARGS ${1+"$@"}
|
||||
|
||||
exit $?
|
||||
|
@ -1,45 +0,0 @@
|
||||
diff -urN build/gcc-4.8.2/gcc/collect2.c /home/thomas/tmp/gcc-4.8.2/gcc/collect2.c
|
||||
--- gcc/collect2.c 2013-06-20 19:12:17.000000000 +0200
|
||||
+++ gcc/collect2.c 2013-11-11 20:08:35.355672907 +0100
|
||||
@@ -3046,6 +3046,7 @@
|
||||
}
|
||||
#endif /* COLLECT_EXPORT_LIST */
|
||||
|
||||
+#undef COLLECT_RUN_DSYMUTIL
|
||||
#ifdef COLLECT_RUN_DSYMUTIL
|
||||
static int flag_dsym = false;
|
||||
static int flag_idsym = false;
|
||||
diff -urN build/gcc-4.8.2/gcc/config/darwin.h /home/thomas/tmp/gcc-4.8.2/gcc/config/darwin.h
|
||||
--- gcc/config/darwin.h 2013-02-12 00:30:10.000000000 +0100
|
||||
+++ gcc/config/darwin.h 2013-11-11 20:17:15.387653343 +0100
|
||||
@@ -195,10 +195,13 @@
|
||||
%{.c|.cc|.C|.cpp|.cp|.c++|.cxx|.CPP|.m|.mm: \
|
||||
%{gdwarf-2:%{!gstabs*:%{!g0: -dsym}}}}}}}}}}}"
|
||||
|
||||
+#undef DSYMUTIL_SPEC
|
||||
+#define DSYMUTIL_SPEC ""
|
||||
+
|
||||
#define LINK_COMMAND_SPEC LINK_COMMAND_SPEC_A DSYMUTIL_SPEC
|
||||
|
||||
/* Tell collect2 to run dsymutil for us as necessary. */
|
||||
-#define COLLECT_RUN_DSYMUTIL 1
|
||||
+#define COLLECT_RUN_DSYMUTIL 0
|
||||
|
||||
/* We only want one instance of %G, since libSystem (Darwin's -lc) does not depend
|
||||
on libgcc. */
|
||||
diff -urN build/gcc-4.8.2/gcc/config/darwin9.h /home/thomas/tmp/gcc-4.8.2/gcc/config/darwin9.h
|
||||
--- gcc/config/darwin9.h 2013-01-10 21:38:27.000000000 +0100
|
||||
+++ gcc/config/darwin9.h 2013-11-11 20:23:12.619639903 +0100
|
||||
@@ -32,8 +32,11 @@
|
||||
%{.c|.cc|.C|.cpp|.cp|.c++|.cxx|.CPP|.m|.mm|.s|.f|.f90|.f95|.f03|.f77|.for|.F|.F90|.F95|.F03: \
|
||||
%{g*:%{!gstabs*:%{!g0: -dsym}}}}}}}}}}}"
|
||||
|
||||
+#undef DSYMUTIL_SPEC
|
||||
+#define DSYMUTIL_SPEC ""
|
||||
+
|
||||
/* Tell collect2 to run dsymutil for us as necessary. */
|
||||
-#define COLLECT_RUN_DSYMUTIL 1
|
||||
+#define COLLECT_RUN_DSYMUTIL 0
|
||||
|
||||
#undef PIE_SPEC
|
||||
#define PIE_SPEC \
|
Loading…
Reference in New Issue
Block a user