1
0
mirror of https://github.com/bebbo/amiga-gcc.git synced 2025-11-19 22:41:33 +00:00

build libnix4.library

This commit is contained in:
bebbo
2024-09-23 14:19:33 +02:00
parent 74e51b3121
commit e8bb4b00bd
6 changed files with 89 additions and 22 deletions

View File

@ -180,9 +180,9 @@ help:
# all
# =================================================
.PHONY: all gcc gdb gprof binutils fd2sfd fd2pragma ira sfdc vasm libnix ixemul libgcc clib2 libdebug libpthread ndk ndk13 min
all: gcc binutils gdb gprof fd2sfd fd2pragma ira sfdc vasm libnix ixemul libgcc clib2 libdebug libpthread ndk ndk13 libSDL12
all: gcc binutils gdb gprof fd2sfd fd2pragma ira sfdc vasm libnix ixemul libgcc clib2 libdebug libpthread ndk ndk13 libSDL12 $(BUILD)/libnix/libb/libnix4.library
min: binutils gcc gprof libnix libgcc
min: binutils gcc gprof libnix libgcc $(BUILD)/libnix/libb/libnix4.library
# =================================================
# clean
@ -902,6 +902,13 @@ $(BUILD)/gcc/_libgcc_done: $(BUILD)/libnix/_done $(BUILD)/libpthread/_done $(LIB
$(L0)"install libgcc"$(L1) $(MAKE) -C $(BUILD)/gcc install-target $(L2)
@echo "done" >$@
# =================================================
# libnix4.library
# =================================================
$(BUILD)/libnix/libb/libnix4.library: $(BUILD)/gcc/_libgcc_done
$(L0)"make libnix4.library"$(L1) CFLAGS="$(CFLAGS_FOR_TARGET)" \
$(MAKE) -C $(BUILD)/libnix -f $(PROJECTS)/libnix/Makefile.gcc6 root=$(PROJECTS)/libnix libb/libnix4.library $(L2)
# =================================================
# clib2
# =================================================

View File

@ -43,8 +43,8 @@ typedef __uint32_t pthread_t; /* identify a thread */
#define PTHREAD_EXPLICIT_SCHED 2 /* set from provided attribute object */
/* P1003.1c/D10, p. 141 */
#define PTHREAD_CREATE_DETACHED 0
#define PTHREAD_CREATE_JOINABLE 1
#define PTHREAD_CREATE_JOINABLE 0
#define PTHREAD_CREATE_DETACHED 1
#if defined(__AMIGA__)
struct pthread_attr;

View File

@ -1,13 +0,0 @@
/* <dirent.h> includes <sys/dirent.h>, which is this file. On a
system which supports <dirent.h>, this file is overridden by
dirent.h in the libc/sys/.../sys directory. On a system which does
not support <dirent.h>, we will get this file which uses #error to force
an error. */
#ifdef __cplusplus
extern "C" {
#endif
#error "<dirent.h> not supported"
#ifdef __cplusplus
}
#endif

View File

@ -3,15 +3,79 @@
#include <sys/time.h>
/*
* Resource limit IDs
*
* ( Compatibility detail: there are architectures that have
* a different rlimit ID order in the 5-9 range and want
* to keep that order for binary compatibility. The reasons
* are historic and all new rlimits are identical across all
* arches. If an arch has such special order for some rlimits
* then it defines them prior including asm-generic/resource.h. )
*/
#define RLIMIT_CPU 0 /* CPU time in sec */
#define RLIMIT_FSIZE 1 /* Maximum filesize */
#define RLIMIT_DATA 2 /* max data size */
#define RLIMIT_STACK 3 /* max stack size */
#define RLIMIT_CORE 4 /* max core file size */
#ifndef RLIMIT_RSS
# define RLIMIT_RSS 5 /* max resident set size */
#endif
#ifndef RLIMIT_NPROC
# define RLIMIT_NPROC 6 /* max number of processes */
#endif
#ifndef RLIMIT_NOFILE
# define RLIMIT_NOFILE 7 /* max number of open files */
#endif
#ifndef RLIMIT_MEMLOCK
# define RLIMIT_MEMLOCK 8 /* max locked-in-memory address space */
#endif
#ifndef RLIMIT_AS
# define RLIMIT_AS 9 /* address space limit */
#endif
#define RLIMIT_LOCKS 10 /* maximum file locks held */
#define RLIMIT_SIGPENDING 11 /* max number of pending signals */
#define RLIMIT_MSGQUEUE 12 /* maximum bytes in POSIX mqueues */
#define RLIMIT_NICE 13 /* max nice prio allowed to raise to
0-39 for nice level 19 .. -20 */
#define RLIMIT_RTPRIO 14 /* maximum realtime priority */
#define RLIMIT_RTTIME 15 /* timeout for RT tasks in us */
#define RLIM_NLIMITS 16
/*
* SuS says limits have to be unsigned.
* Which makes a ton more sense anyway.
*
* Some architectures override this (for compatibility reasons):
*/
#ifndef RLIM_INFINITY
# define RLIM_INFINITY (~0UL)
#endif
#define RUSAGE_SELF 0 /* calling process */
#define RUSAGE_CHILDREN -1 /* terminated child processes */
struct rusage {
struct timeval ru_utime; /* user time used */
struct timeval ru_stime; /* system time used */
struct timeval ru_utime; /* user time used */
struct timeval ru_stime; /* system time used */
};
__stdargs int getrusage (int, struct rusage*);
typedef unsigned rlim_t;
struct rlimit {
rlim_t rlim_cur; /* Soft limit */
rlim_t rlim_max; /* Hard limit (ceiling for rlim_cur) */
};
__stdargs int getrusage(int, struct rusage*);
__stdargs int getrlimit(int resource, struct rlimit *rlim);
__stdargs int setrlimit(int resource, struct rlimit *rlim);
#endif

View File

@ -13,7 +13,8 @@ extern "C" {
#include <sys/_types.h>
#include <stddef.h>
extern char **environ;
extern char ***environ_ptr;
#define environ (*environ_ptr)
__stdargs void _exit (int __status) _ATTRIBUTE ((__noreturn__));

View File

@ -26,6 +26,14 @@ extern "C" {
#define WTERMSIG(w) ((w) & 0x7f)
#define WSTOPSIG WEXITSTATUS
union wait {
int w_termsig;
int w_coredump;
int w_retcode;
int w_stopsig;
int w_status;
};
pid_t wait (int *);
pid_t waitpid (pid_t, int *, int);