Commit graph

72 commits

Author SHA1 Message Date
Lionel Sambuc
971bb1a587 Importing external/mit/xorg support rules
Change-Id: Ib11d8659485a444797bf3a2118182a1d4e316b50
2014-11-10 14:43:29 +01:00
Lionel Sambuc
1230fdc108 external/mit/expat: Import
Change-Id: Ieb49357166b392956df6554a06fcae83c8fd519d
2014-11-10 14:43:28 +01:00
Thomas Veerman
e1c7263ee4 Fix build error on OSX
When building Gold on OSX 10.9 and Clang 6.0, the build process fails
with the error:

In file included from /Users/thomas/minix/tools/binutils/../../external/gpl3/binutils/dist/gold/binary.cc:31:
In file included from /Users/thomas/minix/tools/binutils/../../external/gpl3/binutils/dist/gold/stringpool.h:23:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:438:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cwchar:107:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cwctype:54:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cctype:51:72: error: use of undeclared identifier 'do_not_use_isalnum_with_safe_ctype'
inline _LIBCPP_INLINE_VISIBILITY int __libcpp_isalnum(int __c) {return isalnum(__c);}

Signed-off-by: Thomas Veerman <tveerman@gmail.com>
Change-Id: Ib7ca13a51e83c31bb3020d755e04b308aeacde5d
2014-10-10 12:56:50 +02:00
David van Moolenbroek
eda6f5931d Import tmux
We have to use SOCK_SEQPACKET instead of SOCK_STREAM for client/server
communication, because UDS does things with control messages that tmux
does not expect.

Change-Id: I3edb1875d61fb976cf6485c650f4fd4b82fa354c
2014-10-03 10:01:08 +00:00
David van Moolenbroek
e985b92992 Import libevent
Change-Id: Ic75f4cac5eb07ffaba8f97d10673d7d7e2b1762d
2014-10-03 10:00:53 +00:00
Ben Gras
5075cea916 build lua dynamically
. allows modules to be loaded

Fix submitted by Marc Balmer <mbalmer@NetBSD.org>

Change-Id: I6b2d19c2c9b136f0d72d2f714027221c0b86b5ae
2014-09-28 16:31:54 +02:00
Lionel Sambuc
20a91f7755 Fix -DNEDUG builds
- assert() is macro which is defined as empty, while panic is always
   present. I added an explicit abort() after the macro to make sure the
   function never returns in case of wrong flags.

 - Fixed gcc build with -NDEBUG, -Os for ARM.
   * A few 'may be used uninitialized' messages
   * A few new missing support library functions where added in libminc.

Change-Id: I69fcda2cd3888390b7ddeff4c0cd849105ce86ff
2014-09-02 15:22:15 +02:00
Lionel Sambuc
45474c5368 tools/llvm: Do not build with symbols
Do not build clang and llvm libraries with debug symbols, when built as
a cross-compilation tool.

This saves a lot of space (about 4G), and hopefully also some
compilation time.

Change-Id: Ifeb91d6932d667fa901a8efe1a95a922e6f6ba98
2014-09-01 11:14:06 +02:00
Lionel Sambuc
61df9b64d1 Fixes for -O3 with GCC
Change-Id: I8d8e267cc7996581729df4be0d8e21646ff9e1d2
2014-08-24 09:24:33 +00:00
Lionel Sambuc
3260d16f34 Fix -DNDEBUG support
Change-Id: Ib64cef83a646bce2b0afa72b607fb9e5c306e859
2014-08-22 19:12:17 +02:00
Lionel Sambuc
025179a2b7 Update download urls in fetch.sh
Change-Id: Ib3d6c2771e8bc6d03efa85af52f2ed6288ebc7dd
2014-08-07 14:27:32 +02:00
Lionel Sambuc
341705a4ad fix for crosscompile with llvm and build libstdc++
Change-Id: I1da0b77214a2e128a2649d518e4cf8d23cf13bc0
2014-07-28 17:06:27 +02:00
Koustubha Bhat
5ba302fdea Bridging Minix & llvm-apps repos for instrumentating Minix
Allows instrumentation of Minix components using LLVM passes from
"llvm-apps" repository

In addition, the change does the following:
 1. Move releasetools/generate_gold_plugin.sh to minix/llvm
 2. Move external/bsd/llvm/passes to minix/llvm/passes
 3. libLTO.so, LLVMgold.so and WeakAliasModuleOverride.so files
    now get installed in minix/llvm/bin
2014-07-28 17:06:03 +02:00
Lionel Sambuc
4359ff87e0 Replace cc, c++ & cpp with symlinks
In case of installation of both clang and GCC, we want to be able to
switch which one is the default by adapting the cc, c++ & cpp symlinks.

The default behaviour implemented here is to prefer clang over gcc if
they are both installed.

Change-Id: Ic14720cd876d2bf934d345a955cb5789378209e6
2014-07-28 17:06:02 +02:00
Lionel Sambuc
fed2e50bd7 Compile gold as a tool on MINIX/llvm-only system
This patch is mostly copy-past from answers found in:
  http://www.marshut.com/ikhnkn/compiling-gold-with-libc-and-stl-hash-string.html

This combines the first submitted patch, but applied on gold/gold.h
instead of gold/system.h, as well as the freebsd changes.
2014-07-28 17:06:00 +02:00
Lionel Sambuc
4684ddb6aa LLVM Minix changes
- import libcxx
 - reduce targets to the one when compiled as a tools

Change-Id: Iabb8427f80ff8e89463559a28bcb8b4f2bdbc496
2014-07-28 17:05:59 +02:00
Lionel Sambuc
c03229e600 LLVM Passe which fixes weak aliases overriden from bitcode 2014-07-28 17:05:58 +02:00
Lionel Sambuc
f4a2713ac8 Importing netbsd clang -- pristine
Change-Id: Ia40e9ffdf29b5dab2f122f673ff6802a58bc690f
2014-07-28 17:05:57 +02:00
Ben Gras
e576602d9e set NETBSDSRCDIR in kyua-atf-compat 2014-07-28 17:05:50 +02:00
Lionel Sambuc
10b1980b6e Add TAP output to kyua, see kyua help report-tap.
Change-Id: Id64218b820da85b5dba75324c732f4e02b898849
2014-07-28 17:05:20 +02:00
Ben Gras
5b851f3a9c patch(1) problems workaround
. NUL input in 2 source files cause patch(1)
	  to truncate the input (and fail the patches); a sed
	  command removes the NULs
	. in binutils/ld, configdoc.texi is patched to be removed
	  but some patch(1)es leave an empty file, causing build problems;
	  this file is explicitly removed.

Change-Id: Iec38d3992b0df4f7bbb9a87b1320005ab3272ff1
2014-07-28 17:05:20 +02:00
Ben Gras
4193f2292e fix for ld.so @ bitcode build
ld.so linked with gold didn't work - gold was not generating
the _DYNAMIC ptr in the first GOT entry, leaving it zero, causing
mayhem for ld.so.

  . patch for gold: always generate _DYNAMIC ptr. submitted upstream,
    more info here: https://sourceware.org/bugzilla/show_bug.cgi?id=16900
  . revert "REMOVE ME: Static tests for now" - we can link tests dynamically
    This reverts commit 3e0a3993deb831eb5abcd1c1a2cb1246b43f8d1d.

Change-Id: I4f2910ec2592c31bbd14a85d8a6045497fcaf4e3
2014-07-28 17:05:12 +02:00
Ben Gras
c81f587520 backport 2 binutils patches
These 2 patches are from upstream binutils and together properly
detect whether -ldl is necessary and available to build ld and gold
in plugins mode, instead of hard-coding its usage always. This lets
us build ld and gold on *bsd and minix systems, which do not have
or need -ldl for dl*() functions.

Change-Id: Ie21d027f5d7c225edc9e6e0c6fa2e4b34f421415
2014-07-28 17:05:12 +02:00
Lionel Sambuc
c9ea9e7af8 Binutils: Synchronization & Gold activation
Change-Id: I5235984746178ee30b5db18e7def0016d9a0e36f
2014-07-28 17:05:11 +02:00
Lionel Sambuc
29b8e5ff06 Replace wget with ftp as default in fetch scripts
This default is overriden by curl when it is available on the system.

This allows for the fetch script to work on MINIX systems without any
additions from PKGSRC, while requiring either a netbsd compatible ftp or
curl to be installed on other systems.

Change-Id: Id79f799e1ef0f5fde6bb1c0e570984b7579519fb
2014-07-28 17:05:08 +02:00
Lionel Sambuc
84d9c625bf Synchronize on NetBSD-CVS (2013/12/1 12:00:00 UTC)
- Fix for possible unset uid/gid in toproto
 - Fix for default mtree style
 - Update libelf
 - Importing libexecinfo
 - Resynchronize GCC, mpc, gmp, mpfr
 - build.sh: Replace params with show-params.
     This has been done as the make target has been renamed in the same
     way, while a new target named params has been added. This new
     target generates a file containing all the parameters, instead of
     printing it on the console.
 - Update test48 with new etc/services (Fix by Ben Gras <ben@minix3.org)
     get getservbyport() out of the inner loop

Change-Id: Ie6ad5226fa2621ff9f0dee8782ea48f9443d2091
2014-07-28 17:05:06 +02:00
Lionel Sambuc
f7cf297602 Importing external/bsd/less
Change-Id: I7999b23fbef86a9a5d8d6fe4e80b9bd23d5b9d87
2014-03-03 20:47:02 +01:00
Ben Gras
7120f34ec1 drop <minix/termios.h>, use clean <sys/termios.h>
. also implement some netbsd-style tty ioctls
	. also implement SIGINFO
	. also import netbsd stty
	. rename keymap minix CMIN (for ctrl+minus on numeric keypad)
	  to CNMIN; to keep unchanged control character default CMIN in
	  new <sys/ttydefaults.h>
	. convert CS[5678] logic in rs232 driver to explicit setting of LC
	  bits

Change-Id: I9b7d2963fe9aec00fb6e7535ef565b3191fc1c1d
2014-03-02 12:28:20 +01:00
Ben Gras
6c8f7fc3ba netbsd dirent.h, import sys/sys *.h, mfs cleanup
. add all sys/sys headers not already present to help compiling
	. take netbsd dirent.h and struct dirent; main result is
	  introducing d_type and d_namlen that have to be set by getdents()
	  in all FS code implementing it
	. d_off is gone
	. alignment of the struct has become 8 bytes instead of 4
	. remove _MAX_BLOCK_SIZE, _MIN_BLOCK_SIZE, _STATIC_BLOCK_SIZE
	. libminlib: cleanup unused yet duplicate code
	. mfs: throw out the long-broken v1, v2 support
	. new test for dirent contents filled by getdents()

Change-Id: I1459755c7ba5e5d1c9396d3a587ce6e63ddc283e
2014-03-01 09:04:59 +01:00
Lionel Sambuc
acc46143ab Updating saved configure line in gcc
GCC embeddeds in a string the configuration used when building itself,
this patches just updates that string to match the configuration
actually used.

Change-Id: Ife8f61570b94eb17ce5808b5b58cc5e75e9dc64f
2014-03-01 09:04:57 +01:00
Lionel Sambuc
92395e9c3f external/bsd/mdocml: Update
Change-Id: I17b54e52e8322676d83ed4386f586f8ef3029f72
2014-03-01 09:04:56 +01:00
Lionel Sambuc
ff68abe6b3 Remove obsolete compatibility links
* /usr/bin/strip would be replaced by a link, even when compiling
    binutils.
 * Updated minix-spec.h to use the correct dynamic linker, and removed
    the previously used symlinks.
 * Removed the patch to the builtin PATH of ld.elf_so.

Change-Id: I4dc8a7fb77a11638f5105a4e15b6c9be5add750e
2014-03-01 09:04:56 +01:00
Lionel Sambuc
913340b559 Enable sys-root support in the native binutils
sysroot support was enabled only for cross versions of the binutils
tools.

This patch also activate it for the native tools which are installed
on the target system.

Change-Id: Ica5de7e20719a63f3b695477b767c30d0a93490c
2014-03-01 09:04:55 +01:00
Lionel Sambuc
fb69480b9a Fix some unintialized variables with -O3
Change-Id: I7c41b355a503f97501e9ecb768c77a80d1d7ef0c
2013-10-08 11:45:49 +02:00
Ben Gras
dbafdf6692 libarchive: use -isystem for /usr/include
. 'fixes' warnings that are in these headers, but normally aren't
	   emited as they're system headers

Change-Id: Ibd20343eae51770cef71116bbda0d9141441ec54
2013-08-30 17:21:01 +02:00
Ben Gras
c8f3b10909 fix a few more minix specific warnings
. also disable stack protection feature for gcc,
	  causes build errors for pkgsrc gcc on minix

Change-Id: I1c6e2bcb4d948098d642543d7b2711284ee55c72
2013-08-27 16:16:03 +00:00
Ben Gras
1fbbfa06c2 gcc: realize gas supports visibility
. solution for "warning: visibility attribute not supported in
	  this configuration"
	. needed to make warnings fatal, -Werror

Change-Id: If972300a82df570093f2d89825935483ff69fb18
2013-08-26 18:02:43 +00:00
Lionel Sambuc
11be35a165 Importing NetBSD "Kyua" test framework
To do so, a few dependencies have been imported:

 * external/bsd/lutok
 * external/mit/lua
 * external/public-domain/sqlite
 * external/public-domain/xz

The Kyua framework is the new generation of ATF (Automated Test
Framework), it is composed of:

 * external/bsd/atf
 * external/bsd/kyua-atf-compat
 * external/bsd/kyua-cli
 * external/bsd/kyua-tester
 * tests

Kyua/ATF being written in C++, it depends on libstdc++ which is
provided by GCC. As this is not part of the sources, Kyua is only
compiled when the native GCC utils are installed.

To install Kyua do the following:

 * In a cross-build enviromnent, add the following to the build.sh
   commandline: -V MKBINUTILS=yes -V MKGCCCMDS=yes

WARNING:
  At this point the import is still experimental, and not supported
  on native builds (a.k.a make build).

Change-Id: I26aee23c5bbd2d64adcb7c1beb98fe0d479d7ada
2013-07-23 20:43:41 +02:00
Lionel Sambuc
0cdf705cc6 Enable optional GCC install and GCC improvements
-By adding MKGCC=yes and MKGCCCMDS=yes on the make commandline
   it is now possible to compile and install GCC on the system.

   Before doing this, if you are not using the build.sh script,
   you will need to call the fetch scripts in order to retrieve
   the sources of GCC and its dependencies.

 -Reduce difference with NetBSD share/mk

   Move Minix-specific parameters from bsd.gcc.mk to bsd.own.mk,
   which is anyway patched, so that bsd.gcc.mk is now aligned
   on the NetBSD version.

 -Clean libraries dependencies, compiles stdc++ only if gcc is
   also compiled (it is part of the gcc sources)

 -Correct minix.h header sequence, cleanup spec headers.

 -Fix cross-compilation from a 32bit host targeting MINIX/arm

Change-Id: I1b234af18eed4ab5675188244e931b2a2b7bd943
2013-07-12 14:22:03 +02:00
Lionel Sambuc
c566d4623b Allow install of binutils and import texinfo
- Enable installing binutils from the base system.

 - Import texinfo which is required for the binutils tools
   to be compiled.

 - Also adapted the fetch rules to correctly generate the
   gitignore files for gcc, and allow the case of multiple
   modules in the same directory, as found in gnu/dist.

Warning: This patch has an entry in docs/UPDATING

Change-Id: Ib781734e8fd7f9c6265fa65d62ba2cf3fccbc5ba
2013-07-12 14:18:08 +02:00
Lionel Sambuc
4af66e563d Upgrading to binutils-2.22
* Added --with-ld=default
 * Added --with-lto
 * Fixed ld script for ARM
 * Options are prepared for future activation of gold.

Change-Id: Id9618904055e18d1b37f5e9585f775c367ff356e
2013-07-08 18:53:55 +02:00
Anton Kuijsten
1d71e39b73 Gold linker support for entire source tree 2013-06-11 22:51:02 +02:00
Thomas Cort
a0a1440a52 remove utimes() workarounds
With the addition of utimes(), we can remove the workarounds
and use the original NetBSD code for timestamping files.

Also restore use of -p & -r for install while building
2013-04-12 18:55:40 +00:00
Lionel Sambuc
08ff44c446 Reducing external/bsd/file differences
Change-Id: I0d025059ba0b200ac1162ea5a764fd756600ecd0
2013-04-12 13:25:18 +02:00
Lionel Sambuc
10f4c3fbb1 Reduce differences in libgcc Makefiles for ARM
Change-Id: I1b6b18bce063550907aa6e9ea2061e12b0855de4
2013-03-08 09:41:49 +01:00
Lionel Sambuc
8e4736f2df Removing obsolete _MINIX define
Change-Id: Id33ac7e973d1c0e249b690fe44a597474fac6076
2013-02-26 09:44:20 +00:00
Ben Gras
5a0585359d ARM divsi3.S: raise(SIGFPE) when called for
. raise(SIGFPE) for modulo-0/divide-0 operations in
	  internal int division functions
	. gcc: do not link with -lgcc anywhere so these internal
	  functions are always used from libc instead of (sometimes)
	  masked by -lgcc
	. together fixes test53 on ARM

Change-Id: I31ec19dfdd68b8a92695595da901874e63106f9d
2013-02-09 22:24:59 +01:00
Lionel Sambuc
b1c4ba4ab6 ARM updates
Due to the ABI we are using we have to use the earm architecture
moniker for the build system to behave correctly. This involves
then some headers to move around.

There is also a few related Makefile updates as well as minor
source code corrections.
2013-01-17 10:03:58 +01:00
Lionel Sambuc
b86af8be0b Toolchain adaptation for ARM MINIX support 2013-01-17 10:03:58 +01:00
Lionel Sambuc
f14fb60209 Libraries updates and cleanup
* Updating common/lib
 * Updating lib/csu
 * Updating lib/libc
 * Updating libexec/ld.elf_so
 * Corrected test on __minix in featuretest to actually follow the
   meaning of the comment.
 * Cleaned up _REENTRANT-related defintions.
 * Disabled -D_REENTRANT for libfetch
 * Removing some unneeded __NBSD_LIBC defines and tests

Change-Id: Ic1394baef74d11b9f86b312f5ff4bbc3cbf72ce2
2013-01-14 11:36:26 +01:00