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
This commit is contained in:
@@ -97,7 +97,10 @@ SUBDIR+= ../external/public-domain/xz/lib
|
||||
#SUBDIR+= ../external/gpl3/gcc/lib/libobjc
|
||||
#SUBDIR+= ../external/gpl3/gcc/lib/libgomp
|
||||
. endif
|
||||
. if ${HAVE_GCC} >= 45 && !defined(MLIBDIR) && !defined(__MINIX)
|
||||
# LSC: Replaced __MINIX test with MKGCCCMDS, as we do not want gcc by default
|
||||
# nor the libraries, but we still want toretain the possibility of
|
||||
# installing GCC from the base system.
|
||||
. if ${HAVE_GCC} >= 45 && !defined(MLIBDIR) && ${MKGCCCMDS} == "yes"
|
||||
# Should probably move GMP, MPFR and MPC builds into the GCC >= 4.5
|
||||
# specific build area, but we get better parallelism this way.
|
||||
SUBDIR+= ../external/lgpl3/gmp/lib/libgmp
|
||||
@@ -152,6 +155,7 @@ SUBDIR+= ../external/gpl3/binutils/lib # libbfd depends on libz
|
||||
.endif
|
||||
|
||||
.if (${MKGCC} != "no" && ${MKCXX} != "no")
|
||||
.if (defined(__MINIX) && ${MKGCCCMDS} == "yes")
|
||||
. if ${HAVE_GCC} == 4
|
||||
SUBDIR+= ../gnu/lib/libstdc++-v3_4 # depends on libm
|
||||
SUBDIR+= ../gnu/lib/libsupc++4
|
||||
@@ -159,6 +163,7 @@ SUBDIR+= ../gnu/lib/libsupc++4
|
||||
#SUBDIR+= ../external/gpl3/gcc/lib/libstdc++-v3
|
||||
#SUBDIR+= ../external/gpl3/gcc/lib/libsupc++
|
||||
. endif
|
||||
.endif # (defined(__MINIX) && ${MKGCCCMDS} == "yes")
|
||||
.endif
|
||||
|
||||
#==================== 2nd library dependency barrier ====================
|
||||
|
||||
@@ -37,14 +37,15 @@ STRONG_ALIAS(_start,__start)
|
||||
|
||||
_ENTRY(__start)
|
||||
#ifdef __minix
|
||||
mov r5, r2 /* cleanup */
|
||||
mov r4, r1 /* obj_main */
|
||||
mov r3, r0 /* ps_strings */
|
||||
/* Get argc, argv, and envp from stack */
|
||||
ldr r0, [sp, #0x0000]
|
||||
add r1, sp, #0x0004
|
||||
add r2, r1, r0, lsl #2
|
||||
add r2, r2, #0x0004
|
||||
mov r3, r2 /* cleanup */
|
||||
mov r4, r1 /* obj_main */
|
||||
and r5, r5, #0 /* ps_strings, always NULL on MINIX */
|
||||
|
||||
/* Get argc, argv, and envp from stack */
|
||||
ldr r0, [sp, #0] /* get argc */
|
||||
add r1, sp, #4 /* argv = sp + 4 */
|
||||
add r2, r1, r0, lsl #2 /* envp = argv + argc*4 */
|
||||
add r2, r2, #4 /* skip NULL terminator */
|
||||
#else
|
||||
/*
|
||||
* We need to swap ps_strings and cleanup
|
||||
@@ -57,10 +58,10 @@ _ENTRY(__start)
|
||||
bic sp, sp, #7
|
||||
|
||||
#ifdef __minix
|
||||
/* Store argc and argv on the stack */
|
||||
sub sp, sp, #8
|
||||
str r5, [sp, #4]
|
||||
str r4, [sp, #0]
|
||||
/* Store obj and ps_strings on the stack */
|
||||
sub sp, sp, #8
|
||||
str r5, [sp, #4]
|
||||
str r4, [sp, #0]
|
||||
#endif
|
||||
/*
|
||||
* void ___start(void (*cleanup)(void),
|
||||
|
||||
@@ -143,6 +143,8 @@ ___start(void (*cleanup)(void), /* from shared loader */
|
||||
struct ps_strings minix_ps_strings;
|
||||
|
||||
if (ps_strings == NULL) {
|
||||
memset(&minix_ps_strings, 0, sizeof(minix_ps_strings));
|
||||
|
||||
minix_ps_strings.ps_envstr = envp;
|
||||
minix_ps_strings.ps_argvstr = argv;
|
||||
minix_ps_strings.ps_nargvstr = argc;
|
||||
|
||||
@@ -104,7 +104,7 @@ WARNS?=4
|
||||
.endif
|
||||
|
||||
WARNS?=4
|
||||
#i LSC MINIX, do not compile yet with -Werror...
|
||||
# LSC MINIX, do not compile yet with -Werror...
|
||||
NOGCCERROR=yes
|
||||
|
||||
.PATH: ${.CURDIR}/man
|
||||
|
||||
@@ -11,7 +11,11 @@ SRCS+= casin.c cacos.c catan.c casinh.c cacosh.c catanh.c
|
||||
SRCS+= csqrtf.c cexpf.c clogf.c cpowf.c
|
||||
SRCS+= cephes_subrf.c csinf.c ccosf.c ctanf.c csinhf.c ccoshf.c ctanhf.c
|
||||
SRCS+= casinf.c cacosf.c catanf.c casinhf.c cacoshf.c catanhf.c
|
||||
.if defined(__MINIX)
|
||||
SRCS+= cproj.c cprojf.c
|
||||
.else
|
||||
SRCS+= cproj.c cprojf.c cprojl.c
|
||||
.endif # defined(__MINIX)
|
||||
|
||||
MAN+= cabs.3 cacos.3 cacosh.3 carg.3 casin.3 casinh.3 catan.3 catanh.3
|
||||
MAN+= ccos.3 ccosh.3 cexp.3 cimag.3 clog.3 conj.3 cpow.3 cproj.3 creal.3
|
||||
|
||||
Reference in New Issue
Block a user