Commit graph

151 commits

Author SHA1 Message Date
Lionel Sambuc 85140f57cd TOOL_TIC: Set to "/usr/bin/tic", instead of "tic"
There is a tic command which comes with a package. When this package is
installed, this prevent "make build" from completing, as the packaged
tic as incompatible arguments.

Change-Id: Ic75057013b92158d715c5533f01d79f65317a400
2014-08-13 16:42:56 +02:00
Lionel Sambuc f1deff716e Improve default HOST_CC / CC settings
Instead of blindly defaulting to cc, try to find the actual compiler
installed on the system, and as a last resort

Change-Id: I114780b8e4bb54fab72dbd80466266126d6574a5
2014-07-31 19:19:36 +02:00
Ben Gras a2502f41d7 CC=.. mkdep fix
Change-Id: If9dd0d0ca3c272c31896dfc423b7320edc89861e
2014-07-31 16:36:17 +02:00
Lionel Sambuc 433d6423c3 New sources layout
Change-Id: Ic716f336b7071063997cf5b4dae6d50e0b4631e9
2014-07-31 16:00:30 +02:00
Cristiano Giuffrida 9f6977d22d llvm: Split BITCODE_LD_FLAGS
Split across the two linking steps for instrumentation purposes.
2014-07-28 17:06:06 +02:00
Koustubha Bhat dd85959391 LLVM Hello pass: inserts printf statement in main() method. 2014-07-28 17:06:04 +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 b811a43401 default CC to clang
Change-Id: I5a4e6bfebd0b283f8f025fa91d27b1ac832f7b81
2014-07-28 17:06:01 +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 f4a2713ac8 Importing netbsd clang -- pristine
Change-Id: Ia40e9ffdf29b5dab2f122f673ff6802a58bc690f
2014-07-28 17:05:57 +02:00
David van Moolenbroek 87d31b0645 Correct a few library dependency tracking mistakes
Change-Id: I3d509db3946ca6c284be64c92c4cec313cc4ca1b
2014-07-28 17:05:56 +02:00
Lionel Sambuc efa169276f WeatherStation: slight update
- Replaced the use of string.find by string.match, as it was not
   working as expected with the new lua interpretor.

 - Slight simplification of extract_value as we now can use a full-blown
   regular expression.

Change-Id: I1d7df66a272120cd10aa40f8e9326057b9709e3d
2014-07-28 17:05:40 +02:00
Lionel Sambuc ecad34966a Fix ARM floating point for services
Change-Id: Ic5772a7a78ea13ab6bb8db3ffd7f0906fd1380cf
2014-07-28 17:05:40 +02:00
Kees Jongenburger 1f619c93a8 build:make libminc a build dependency of services.
Make libminc a build dependency of services to ensure the services
get rebuilt if libminc changes.

Change-Id: I703a9d98d7641a9a85e04d88402a7228ad0be19f
2014-07-28 17:05:21 +02:00
Ben Gras 3f38115c7b _MINIX_SYSTEM - fixes for in-minix crossbuild
. define _MINIX_SYSTEM for all system code from minix.service.mk
	. hide some system-level declarations and definitions
	  behind _MINIX_SYSTEM to cleanly fix host tool build problems on
	  Minix (such as: NONE being defined and paddr_t being used but not
	  declared)
	. the similar definition _SYSTEM is unsuitable as it changes the
	  values of errno definitions

Change-Id: I407de79e2575115243a074b16e79546a279cfa3e
2014-07-28 17:05:14 +02:00
Ben Gras fad76abe45 Install sources with MKSRC=yes
Change-Id: Iee433cfe6796af0ea292c7eadff365a32059a609
2014-07-28 17:05:12 +02:00
Ben Gras 18e90974b2 force C++ executables to be dynamic
. for C++ exceptions when built with llvm and using libunwind

Change-Id: I22fe6a1fd0b2af7323c7deecce919764e2354614
2014-07-28 17:05:08 +02:00
Lionel Sambuc d3d33afe9f Experimental pthread compatibility library
This patch adds pthread compatibility by using libmthread.

To use this with a program using pthreads, you have to replace
  #include <pthread>
with
  #define _MTHREADIFY_PTHREADS
  #include <minix/mthreads>

This also changes the initialization function to be a constructor, which
is implicitly called before the call to main. This allows for
conformance with pthreads, while not paying a high price by checking on
each mthread_* call whether the library has been initialized or not.

As mthread_init is now a constructor, it also has been set as static, and
relevent calls removed from programs using it.

Change-Id: I2aa375db557958d2bee9a70d285aabb990c88f00
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
David van Moolenbroek f30a16b159 Remove support for MKTRACE, MKMCONTEXT, MKSTATECTL
Change-Id: Ib5fa53913ecb7b46d30d391dbdd3e8ef21eb2254
2014-03-01 09:04:59 +01:00
Lionel Sambuc bbb8908c16 Adapting build system to call MAKEDEV for /dev
* Remove static proto.dev
 * Update releasetools/*image.sh not to use proto.dev, as well as
   minor comments cleanup
 * Add TOOL_TOPROTO

Change-Id: If7dc16d4ebb3b0c4e859786fad25d4af000c999f
2014-03-01 09:04:56 +01:00
Lionel Sambuc 84a7c3f464 fix sysroot clang
Change-Id: I63adf8460e7fdbe3d9d5ad6c828ae5758cb1643c
2014-02-18 11:25:01 +01:00
Ben Gras 74bc88581c enable fatal warnings
. kernel: fix some arm warnings
	. turn of fatal warnings for texinfo

Change-Id: I71e228c87a7226adbbd940ccb1439e042d7b6e9a
2013-09-01 12:59:37 +00: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
Thomas Cort 60a61dffae weatherstation: BeagleBone Weather Cape demo app.
The BeagleBone Weather cape enhances the BeagleBone's capabilities
by providing environment sensors (temperature, humidity, pressure,
and ambient light level).

The weatherstation demo is a port of the bonescript weatherstation
to Minix. It provides a nice visual display of the sensor data in
a web browser.

The code is installed to /usr/share/beaglebone/weather on 'earm'
and an embedded web server is started at boot time on port 80
when the cape is attached. Further details are provided in the
README.txt file.

Change-Id: I1596a2b66b213762ace26c0c750c8154c76b5c6e
2013-08-26 21:51:32 +02: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
Anton Kuijsten 2e3046757a LLVM bitcode for almost the whole source tree
Change-Id: Ibc6f89de112e0649c3a3bfe49c2baa2ed0746212
2013-06-18 10:49:53 +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
Ben Gras d6bc6cb44b some etc fixes
. split user-editable and system-owned files in etc/Makefile
	. mtab is a symlink, not a file now; remove it
	. force-install of certain system-controlled /etc files from
	  top Makefile
	. rename /etc/make.conf to /etc/mk.conf; and don't set $ARCH;
	  reduce difference in bsd.own.mk

Change-Id: I9f4bbb8d37ba80cba7dcfcf1a9a89e934910f579
2013-04-04 12:50:12 +00:00
Tomas Hruby a1fa603ed5 lwip (inet's alternative) is compiled by default 2013-03-25 16:51:25 +01:00
Tomas Hruby ee0cc364a8 core is not cleaned in libraries
- according to Lionel, no such files are generated

- it conflicts with the core subdirectory in liblwip
2013-03-25 16:51:25 +01:00
Lionel Sambuc fbd82e76a4 Let the build system manage compilation flags
Do not hardcode warning and optimisation flags, otherwise the
main options (i.e. DBG, CPPFLAGS) will not work as expected.

You can still provide specific default by using DBG?=<value>.

Doing so leaves the opportunity to override the setting from the
commandline, while the default value from the build system is
then ignored for that particular package.

When crosscompiling, and using build.sh, adding -V DBG=<value> has
this same effect as make DBG=<value>.

Change-Id: Ic610e4d33b945acad64571e1431f1814291e2d84
2013-03-08 09:41:49 +01:00
Lionel Sambuc 8f3fbf7cc1 Cleanup: Remove minix.bootprog.mk
The build system distinction between "bootprog" and "service" is
meaningless as boot programs are standard services.

As minix.service.mk simply imports minix.bootprog.mk, reduce confusion
by removing minix.bootprog.mk and placing the rules in minix.service.mk.

Change-Id: I4056b1e574bed59a8c890239b41b1a7c7cad63e8
2013-03-06 11:56:56 +01:00
Lionel Sambuc f640210005 Removing obsolete _NBSD_LIBC define
Change-Id: Ia6ce84ccdf36cf6f64540b990baaa7d85c53533d
2013-02-26 09:44:24 +00: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 f9f6c9251a Re-adding extended keys in minix termcap entry 2013-01-23 21:28:17 +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 0c3ae37f52 Updating libcurses, libterminfo and terminfo.
The three are updated together as they are tightly coupled.

Change-Id: I9e1f07b6adc6e8ae10833e6f1402f8472d2d34b8
2013-01-14 11:36:26 +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
Lionel Sambuc 8e5df35e84 Importing NetBSD tsort
Change-Id: I110de8037b9253f4fe53cbe13dc8fc281aeea2ec
2012-12-07 13:58:07 +01:00
Lionel Sambuc 95d6c86c51 Removing COMPILER_TYPE define which is now unused.
Change-Id: I0332b53e5de6bb2b85759325559c89c02b437e41
2012-12-07 13:58:06 +01:00
Lionel Sambuc a83e3a14fe Fixing warning about incorrect test in some build environment
Change-Id: I17c69e96b4278fb39a95c7b0554c779c4d1f637c
2012-12-07 13:58:05 +01:00
Lionel Sambuc b0814fec4e Fix release.sh to work with NetBSD Build system.
Also fix a potential issue where host tools would be compiled
dynamically under MINIX.

This also updates proto.common.dynamic to use the new placement
of the dynamic libraries (/usr/lib)
2012-11-26 10:46:19 +01:00
Lionel Sambuc a020815b8b Detect clang version, instead of assuming default one
Change-Id: I559fe4251169f489d89e30b3576f8da08fb0941b
2012-11-15 16:12:45 +01:00
Lionel Sambuc b8a678ef1d Cross compile on minix support
* Remade patch so it works with minix patch tool.

 * New MINIX tar support -ox, so revert back to it

   In fetch scripts, tar had been replaced by bsdtar as the prebvious
   tar did not support the -o flag under minix, which is required to
   prevent usage of tar file stored user and group information.

   This introduces portability problems. As our new tar tool now
   support that flag revert back to improve portability.
2012-11-15 16:07:30 +01:00