106 Commits (7f44d19e6b0ffd99a55586a78ba9bfce5a0916b9)

Author SHA1 Message Date
David Chisnall 7832765112 Improve detection of libsupc++ 8 years ago
David Chisnall dc9b8313a4 Rework C++ library detection.
macOS ships with libc++abi, which doesn't provide the hooks required
for interop, so this was causing all of the tests to fail to link in
the Travis macOS test.  We're now correctly detecting that it won't
work on macOS and disabling those tests.
8 years ago
David Chisnall fefb333b01 Remove the separate libobjcxx.
If we don't find a separate dynamically linkable C++ runtime, then
depend on the C++ standard library implementation.
8 years ago
David Chisnall a54272c1ab Merge origin/master into newabi (using imerge) 8 years ago
Daniel Ferreira 1593ac04af Add objc-class.h to objc headers
Some applications still include the old objc-class.h header expecting
to obtain the declarations contained in objc/message.h and
objc/runtime.h nowadays. This commit adds this header to achieve
out-of-the-box compatibility with these applications.
9 years ago
davidchisnall e285ba83a9 Merge pull request #36 from theiostream/block-headers
build: add compatibility symlink for block headers

Fixes #34
9 years ago
Daniel Ferreira a9aba57e7c build: add compatibility symlink for block headers
On FreeBSD and OSX, the block runtime functions are defined on a Block.h
and a Block_private.h headers on the include path as opposed to
libobjc2's objc/blocks_runtime.h and objc/blocks_private.h respectively.

This commit amends libobjc2's install routine to create the
FreeBSD-style headers as symlinks to the ones provided by libobjc2 for
improved compatibility.
9 years ago
Daniel Ferreira a3e1a0d3ed Add objc-runtime.h to objc headers
Some applications still include the old objc-runtime.h header expecting
to obtain the declarations contained in objc/message.h and
objc/runtime.h nowadays. This commit adds this header to achieve
out-of-the-box compatibility with these applications.
9 years ago
David Chisnall 12d1ea62a4 Merge branch 'master' into newabi 9 years ago
David Chisnall d692a0ede4 Remove some definitions that hide non-standard libc functions that we use. 10 years ago
David Chisnall f55c158be8 First pass at new Objective-C ABI. 10 years ago
David Chisnall 2ea11117a3 Remove the LLVM optimisation passes. They don’t work with a recent LLVM, can be recovered from git if required, and are better off being upstreamed into LLVM if they make sense. 10 years ago
David Chisnall bd790df7e3 Disable building LLVM passes for now. It’s unlikely that anyone actually wants them at the moment, and we should probably remove them at some future date. 10 years ago
Niels Grewe 40b7f872e9 Also specify -march=i586 when compiling with gcc 10 years ago
Niels Grewe f1c58120b9 Remove bogus workaround for build system issue 10 years ago
Niels Grewe 8b5e85a95c Set the -pthread compiler flag when pthreads is used.
Apparently, setting -lpthread is not enough to convince gcc to actually
link a thread library, so if we are using pthreads, set the -pthread
flag as well. It fixes the gcc situation and doesn't have any adverse
effects for clang either.
10 years ago
David Chisnall 857edd9ef7 Fix the README name for CPack. 11 years ago
theraven 76a88312dd Work around GNUstep's inability to initialise NSAutoreleasePool without
performing recursive autoreleases (introduced in r37479).
Fixes crashing of C++ static constructors.
12 years ago
theraven 55bbcd8748 Only emit section directives on ELF platforms. 12 years ago
theraven c819b379da Fix the build with GC enabled, export the GC symbols in all build configurations. 13 years ago
theraven 4387d80fb1 Only use .type on ELF targets. 13 years ago
ericwa 317e951b0c libobjc2: some changes needed to build on OS X. CDECL macro to prefix symbol names in assembly code with an underscore, macros to omit the .type and .section derictives which are unsupported on OS X, and also a linker flag to make weak symbols work 13 years ago
theraven 71b6439091 Fix the build without gnustep-config by not relying on a variable that seems to
only be set on Ubuntu...
13 years ago
theraven f50bc6cf33 Added support for tracing message sends to the runtime.
Currently x86-64 only.
13 years ago
theraven 2f720fb30e Respect CMAKE_INSTALL_LIBDIR when determining library install paths.
Patch by Lubos Dolezel!
13 years ago
theraven 60a3605c6c Added a test that the C++ runtime is really useable (i.e. exports the symbols that we need). 13 years ago
theraven 55f40d8b58 Force finding of the shared lib version of the C++ runtime lib. 13 years ago
theraven c37fdd98ad Add CMake options for disabling ObjC++ entirely and for forcing the build of a separate libobjcxx.so. 13 years ago
theraven 3b44e6f97a Fix the build with LLVM 3.3 and enable building the optimisation passes by
default of LLVM 3.3 is found.
13 years ago
theraven 5ededfe863 Allow the user to specify the library path. 13 years ago
thebeing 26b04515a9 Link libdispatch if it is available, since the toydispatch stuff will pull it in. 13 years ago
theraven cbd227ad1e Bump up XOPEN source version so snprintf() is visible on FreeBSD 13 years ago
theraven 4b76f0134d Default to only building LLVM optimisations if the version of LLVM is tested. 13 years ago
theraven 8cce906a41 Hopefully fix the build on crazy libc implementations. 13 years ago
theraven 8ee95e805a Install the message.h header. 13 years ago
theraven bcf6e32311 Make it possible to disable building the tests. 13 years ago
theraven d1336543d8 Build with exceptions (fixes the issue with crashes where +initialize throws)
Start adding the tests to CMake.
13 years ago
theraven c6614a218c Install libobjcxx if we're building it. 13 years ago
theraven 86d07fa024 Install libobjcxx, if it's built. 13 years ago
theraven ee927d20a5 Remove definitions that don't appear to be needed anymore. 13 years ago
theraven c98014b667 Actually commit the disabling of the llvm opts, and not the output from cmake
help...
13 years ago
theraven be2ee54190 Default building the LLVM optimisations to off if the LLVM CMake module is not
found.
13 years ago
theraven 150aa4ef19 Fix linkage in libobjc. 13 years ago
theraven db3cbec65a Make sure that the asm files are built. Add a configuration option for the include headers so OpenBSD can put them in include/gnustep/objc/ 13 years ago
theraven a5cc173310 Correctly handle the case of GNUstep config not existing. 13 years ago
theraven 651962702a Add uninstall target to CMake. 13 years ago
theraven bfc1a2ed11 Add a flag for setting the library name. 13 years ago
theraven 501d5b9828 Set the C++ runtime to nothing if it is not found. 13 years ago
theraven 2841400e0c Add CPack configuration to CMakeLists.txt. RPMs, DEBs and tarballs can now be built directly from the build system. 13 years ago
theraven a5b4ab9937 Specify the current runtime version to target if the compiler supports this
flag.  This means that the .m files in the runtime will take advantage of
features of this runtime when compiled with a recent clang.
13 years ago
theraven 3c7d6f8fd9 Fix merging CFLAGS. 13 years ago
theraven 01bf761766 Target i586 on i686 with clang. 13 years ago
theraven 7afed09286 Change how installation location is detected, as per Quentin's suggestion. 13 years ago
theraven 94570d9895 Actually fix header install locations... 13 years ago
theraven 6c131e2eb7 Fix header installation location. 13 years ago
theraven 3081618c47 Add CMake build system for libobjc2. This will replace the existing build
systems after some further testing.

Currently, we have three build systems for libobjc2:

- GNUmakefile, which provides a number of options but not very cleanly (i.e.
  the only way of knowing what they are is to read the source) and doesn't
  correctly build the Objective-C++ runtime.
- Makefile, which works correctly for a single configuration, but requires
  tweaking by hand to build others.
- Makefile.clang, which is experimental, doesn't really work, and confuses
  people.

The new CMake system:

- Correctly installs in a GNUstep location if one exists, or in a system
  location otherwise.  This is configurable at build time.
- Provides inspectable options for all of the configuration choices (run ccmake
  to see them all)
- Easily supports cross-compilation and out-of-tree builds
- Is easy to extend and inspect
- Automatically builds the LLVM optimisations (which already use CMake, as it's
  the only clean way of building LLVM optimisations out of tree) and can be
  easily configured not to if they are not required.
- Will build a single libobjc.so for platforms that provide a separate C++
  runtime and a separate libobjcxx for ones that don't.
- Can generate build files for make, ninja, XCode, Eclipse, and Visual Studio

For those unfamiliar with CMake, the best way of building is an out-of-tree
build.  For the simplest case, it's just a matter of:

$ mkdir build
$ cd build
$ cmake ..
$ make
$ sudo -E make install

If you wish to edit any of the configuration options, the easiest way is to run
ccmake instead of cmake.  You can also run ccmake . from the build directory to
edit the options after initial configuration.

For faster builds , try using ninja instead of make.  Add -G Ninja to the
[c]cmake command line and then run ninja instead of make.
13 years ago