Commit Graph

97 Commits

Author SHA1 Message Date
Don Bright
09973626eb typo fix 2014-03-26 20:34:46 +01:00
Don Bright
c697511015 automatically find the SDK version, allow SDK_VERSION env var, deal w ubuntu bug 2014-03-26 20:34:46 +01:00
Don Bright
4829d49f39 freebsd auto-get dependencies 2014-03-26 20:34:46 +01:00
Don Bright
60d74c1a40 freebsd autoget dependencies 2014-03-26 20:34:45 +01:00
Thomas Pöchtrager
e95390a7c1 update cctools port
changes:

do not store .gitignore in the package
fix an issue in emulated _NSGetExecutablePath()
fix finding llvm-config on FreeBSD 10
cctools: make is_llvm_bitcode() more portable (fixes -flto with multiple -arch flags)
ld64: use faster strlcpy()/strlcat() "helper" implementations
ld64: fix qsort_r() helper function
fix emulated _NSGetExecutablePath() for FreeBSD
fix -luuid linkage issue on FreeBSD 10
add DISABLE_LTO_SUPPORT option
2014-03-26 20:32:56 +01:00
Thomas Pöchtrager
995ad1d4ab fix building GCC on FreeBSD
add missing float.h intrinsic header (FreeBSD)
2014-03-26 20:32:56 +01:00
Thomas Pöchtrager
78d78d4276 Revert "~/.bashrc -> ~/.profile"
This reverts commit 7f6fcf3b085c8cf88cba5a606aaeaa18848ceb0d.
2014-03-26 20:32:56 +01:00
Thomas Pöchtrager
77b27e099f ~/.bashrc -> ~/.profile 2014-03-26 20:32:56 +01:00
Thomas Pöchtrager
3a7c2e6635 build bc on systems where it is not (pre-)installed 2014-03-26 20:32:56 +01:00
Thomas Pöchtrager
e935b36688 fix compiling pre-compiled headers 2014-03-26 20:32:56 +01:00
Thomas Pöchtrager
5e82ba96f7 add '--enable-checking=release' to the gcc configure flags 2014-03-26 20:32:56 +01:00
Thomas Pöchtrager
1077cf95fd switch to libc++ 3.4 (works fine with clang < 3.4)
get OSX_VERSION_MIN >= 10.9 working (defaults to libc++)
simplify the wrapper scripts a bit
2014-03-26 20:32:56 +01:00
Thomas Pöchtrager
afef99a299 remove the 'weak debug info' notes from the README
Debug symbols work anyway as long you *don't* build the binary in a single step:

o32-clang++ test.cpp -g3           # causes dsymutil invocation

o32-clang++ test.cpp -g3 -c        # causes *no* dsymutil invocation
o32-clang++ -g3 test.o -o test     # causes *no* dsymutil invocation

same with gcc.

Getting line numbers may require you to copy the object files (*.o) onto the system you are debugging on.
2014-03-26 20:32:56 +01:00
Thomas Pöchtrager
241d9df6bc stdout -> stderr 2014-03-26 20:32:56 +01:00
Thomas Pöchtrager
99a8ee449f 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)
2014-03-26 20:32:55 +01:00
Thomas Pöchtrager
71f25f382b fix some typos 2014-03-26 20:32:55 +01:00
Thomas Pöchtrager
bbb88618b0 add a few more FreeBSD notes to the README 2014-03-26 20:32:55 +01:00
Thomas Pöchtrager
2815a603c1 use -L instead of LIBRARY_PATH env variable to find libc++
> LIBRARY_PATH is now being ignored in clang 3.5 when doing cross compiling:
> ffbfc0782f
2014-03-26 20:32:55 +01:00
Thomas Pöchtrager
d988fe29da system -> platform 2014-03-26 20:32:55 +01:00
Thomas Pöchtrager
2c38fb673e move duplicate code into a single file
add debug option (OCDEBUG=1 ./<script>)
update README
2014-03-26 20:32:55 +01:00
Thomas Pöchtrager
42e3fc51cc fix a typo in the README 2014-03-26 20:32:55 +01:00
Thomas Pöchtrager
89d48e1a45 fix LIB_PATH issue 2014-03-26 20:32:55 +01:00
Thomas Pöchtrager
2a4842f3cc add libc++ build script
update README with libc++ build instructions and samples
fix mavericks SDK download link (pointed to 10.8)
build xar only for <=10.5
add -g0 to the clang invocation command to avoid dsymutil from being run (debugging is not supported, but I guess you don't want to debug the resulting binaries anyway if you build them on a non OS X system)
attempt to make the toolchain less path dependent (gcc still breaks though, because of hardcoded paths), but clang and cctools can be moved now
update cctools to 845
add DISABLE_LTO_SUPPORT option (DISABLE_LTO_SUPPORT=1 ./build.sh) to disable linking against libLTO.so
add support for 32 bit systems
add FreeBSD support
update PACKAGE script
2014-03-26 20:32:55 +01:00
Thomas Pöchtrager
b62b01644f libuuid-devel -> uuid-devel 2014-03-26 20:32:31 +01:00
Thomas Pöchtrager
8a5c32021e oclang/ogcc wrapper: check if '-mmacosx-version-min=' is already given through the invocation command 2014-03-26 20:32:31 +01:00
Thomas Pöchtrager
e7160ea10a there is an issue in the OSX SDK stdarg.h header file which causes va_copy not to be defined with -std=c++11, so use clang's fixed intrinsic header instead
diff:

-#if __STDC_VERSION__ >= 199900L || !defined(__STRICT_ANSI__)
+#if __STDC_VERSION__ >= 199900L || __cplusplus >= 201103L || !defined(__STRICT_ANSI__)
 #define va_copy(dest, src)  __builtin_va_copy(dest, src)
 #endif
2014-03-26 20:32:31 +01:00
Thomas Pöchtrager
65944f3394 help clang to find its own intrinsic headers (this issue appears to be fixed in clang 3.4+)
bump version to 0.5
2014-03-26 20:32:31 +01:00
Thomas Pöchtrager
d957737e0f really show an error message in case the SDK is not found 2014-03-26 20:32:31 +01:00
Thomas Pöchtrager
2c0cb38fbe more portable way to find the llvm lto.h header
should now support llvm 3.2-3.5
2014-03-26 20:32:30 +01:00
Thomas Pöchtrager
339712ba21 ogcc wrapper: don't append '-arch' when '-mXX' is already given through the invocation command 2014-03-26 20:32:30 +01:00
Thomas Pöchtrager
5a74122c92 ogcc wrapper: don't append '-arch' when '-arch' is already given through the invocation command
minimial build_gcc.sh cleanup
2014-03-26 20:32:30 +01:00
Thomas Pöchtrager
962e6acdfc small build script fixes 2014-03-26 20:32:30 +01:00
Thomas Pöchtrager
cbaa387542 small cleanup 2014-03-26 20:32:30 +01:00
Thomas Pöchtrager
5af3f4eb2d update CHANGELOG 2014-03-26 20:32:30 +01:00
Thomas Pöchtrager
0df1bbd817 Update README.md 2014-03-26 20:32:30 +01:00
Thomas Pöchtrager
3c377fa9e9 update README.md one more time 2014-03-26 20:31:59 +01:00
Thomas Pöchtrager
34a0ef5d80 Update README.md 2014-03-26 20:31:39 +01:00
Thomas Pöchtrager
5dffd32ec0 Update README.md 2014-03-26 20:31:39 +01:00
Thomas Pöchtrager
b42405f4ed switch to a markdown-formatted README 2014-03-26 20:31:39 +01:00
Thomas Pöchtrager
d502ab0138 use a nifty preprocessor trick to workaround the __block issue in unistd.h
get rid of the  || exit 1  in build.sh by using  set -e
2014-03-26 20:29:50 +01:00
Thomas Pöchtrager
fba6b74ff9 update README and TODO 2014-03-26 20:29:50 +01:00
Thomas Pöchtrager
7403edf066 revert unintentionally committed change in build_gcc script 2014-03-26 20:29:50 +01:00
Thomas Pöchtrager
dc8c4719c3 enforce building gcc with clang - otherwise building gcc will fail (probably a configuration bug in gcc)
building gcc with gcc (targeting OS X on linux) causes the following errors:

error 1:

g++   -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE  -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings   -DHAVE_CONFIG_H -static-libstdc++ -static-libgcc  -o xg++ \
          gcc.o ggc-none.o g++spec.o driver-i386.o darwin-driver.o libcommon-target.a \
           libcommon.a ../libcpp/libcpp.a   ../libbacktrace/.libs/libbacktrace.a ../libiberty/libiberty.a ../libdecnumber/libdecnumber.a
/usr/bin/ld: unrecognised emulation mode: acosx_version_min
Supported emulations: elf_x86_64 elf32_x86_64 elf_i386 i386linux elf_l1om elf_k1om i386pep i386pe

error 2:

g++ -c  -DIN_GCC_FRONTEND -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE  -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings   -DHAVE_CONFIG_H -I. -I. -I../../gcc -I../../gcc/. -I../../gcc/../include -I../../gcc/../libcpp/include  -I../../gcc/../libdecnumber -I../../gcc/../libdecnumber/dpd -I../libdecnumber -I../../gcc/../libbacktrace    cc1-checksum.c -o cc1-checksum.o
cc1plus: error: unrecognized command line option '-mmacosx-version-min=10.4'

after fixing the -mmacosx-version-min issue in the gcc/specs file, I get the following weird error (gmp is indeed installed):

g++ -c  -DIN_GCC_FRONTEND -g  -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE  -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings   -DHAVE_CONFIG_H -I. -I. -I../../gcc -I../../gcc/. -I../../gcc/../include -I../../gcc/../libcpp/include  -I../../gcc/../libdecnumber -I../../gcc/../libdecnumber/dpd -I../libdecnumber -I../../gcc/../libbacktrace    cc1-checksum.c -o cc1-checksum.o
In file included from cc1-checksum.c:2:0:
../../gcc/system.h:641:17: fatal error: gmp.h: No such file or directory
 #include <gmp.h>

all these errors do not appear when clang is used for building gcc.
2014-03-26 20:29:50 +01:00
Thomas Pöchtrager
9c5a089a7f fix cctools path in osxcross-conf 2014-03-26 20:29:50 +01:00
Thomas Pöchtrager
55ae02b117 support building a gcc as well
rename the project to osxcross
bump version to 0.4
2014-03-26 20:29:50 +01:00
Thomas Pöchtrager
3e81644303 remove outdated note 2014-03-26 20:29:50 +01:00
Thomas Pöchtrager
2e957af35c initial commit 2014-03-26 20:28:13 +01:00