Ben Gras [Sun, 4 May 2014 11:52:22 +0000 (13:52 +0200)]
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.
Ben Gras [Thu, 13 Mar 2014 12:21:32 +0000 (13:21 +0100)]
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.
Thomas Cort [Sat, 22 Feb 2014 21:32:12 +0000 (16:32 -0500)]
x86_hdimage.sh: use nbstat from tooldir.
The syntax of the stat(1) command varies between Linux and FreeBSD.
This prevented `x86_hdimage.sh -i` from succeeding on FreeBSD 10.0.
The fix is to use the NetBSD stat from the tooldir for all systems.
Lionel Sambuc [Tue, 14 Jan 2014 12:48:43 +0000 (13:48 +0100)]
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.
Lionel Sambuc [Thu, 23 Jan 2014 10:38:26 +0000 (11:38 +0100)]
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.
Lionel Sambuc [Fri, 6 Dec 2013 11:04:52 +0000 (12:04 +0100)]
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
Ben Gras [Tue, 10 Dec 2013 23:47:22 +0000 (00:47 +0100)]
<machine/signal.h>
. use netbsd sigframe, sigcontext struct
. netbsd sigframe *contains* sigcontext; use that directly
in kernel sigsend
. drop two fields from minix x86 stackframe.h (process context)
that were unused, retadr and st
Lionel Sambuc [Tue, 3 Dec 2013 10:51:21 +0000 (11:51 +0100)]
include/time.h: merged
- Defining CLOCKS_PER_SEC = 100, instead of 60.
This define is here for legacy reasons, use sysconf(_SC_CLK_TCK) to
retrieve the actual number of clock tick per second of the system in
new code.
Lionel Sambuc [Tue, 19 Nov 2013 14:26:47 +0000 (15:26 +0100)]
libc/sys-minix/mount.c: fix overflow
Fix a bug where a filesystem label could overflow the reserved buffer.
This was already possible with 32 bits values, but is more proeminent
with dev_t being 64 bits.
Lionel Sambuc [Mon, 18 Nov 2013 14:18:18 +0000 (15:18 +0100)]
Add a compile-time check for IPC messages size
This patch adds compile-time check for each message type to ensure the
size is within the IPC assumptions.
This will allow messages specific to a protocol to use from now on the
proper types for each fields, while preventing from any unsuspected
side effect when updating type definitions.
Ben Gras [Tue, 22 Oct 2013 15:08:15 +0000 (17:08 +0200)]
use netbsd <sys/signal.h> and sigset_t
. create signals-related struct message type to store sigset_t
directly
. create notify-specific message types, so the generic NOTIFY_ARG
doesn't exist anymore
. various related test expansions, improvements, fixes
. add a few error-checks to sigismember() calls
. rename kernel call specific signals fields to SYS_*
Ben Gras [Tue, 10 Sep 2013 21:36:48 +0000 (21:36 +0000)]
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
Ben Gras [Mon, 9 Sep 2013 13:20:18 +0000 (13:20 +0000)]
big <utmp.h>-inspired netbsd switch
import/switch of:
init, getty, reboot, halt, shutdown, wall, last
changes:
. change reboot() call to netbsd prototype and args
. allows pristine <utmp.h>
. use clean <sys/reboot.h> instead of <minix/reboot.h>
. implement TIOCSCTTY for use by getty so getty can get
controlling terminal from init's child(ren)
. allow NULL envp for exec
Lionel Sambuc [Fri, 1 Nov 2013 12:34:14 +0000 (13:34 +0100)]
Adding ipc_ prefix to ipc primitives
* Also change _orig to _intr for clarity
* Cleaned up {IPC,KER}VEC
* Renamed _minix_kernel_info_struct to get_minix_kerninfo
* Merged _senda.S into _ipc.S
* Moved into separate files get_minix_kerninfo and _do_kernel_call
* Adapted do_kernel_call to follow same _ convention as ipc functions
* Drop patches in libc/net/send.c and libc/include/namespace.h
Lionel Sambuc [Wed, 30 Oct 2013 17:12:35 +0000 (18:12 +0100)]
Remove some legacy support in rc scripts & some cleanup
* Remove support for the Poor Man fstab
* Remove checks for the missing ARCH kernel variable
* Remove .ashrc which is anyway only read once per login
* Cleanup PATH variable