minix/share/mk/bsd.gcc.mk
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

45 lines
1.3 KiB
Makefile

# $NetBSD: bsd.gcc.mk,v 1.4 2012/07/19 19:42:45 christos Exp $
.if !defined(_BSD_GCC_MK_)
_BSD_GCC_MK_=1
.if defined(EXTERNAL_TOOLCHAIN) && !defined(__MINIX)
_GCC_CRTBEGIN!= ${CC} --print-file-name=crtbegin.o
_GCC_CRTBEGINS!= ${CC} --print-file-name=crtbeginS.o
_GCC_CRTEND!= ${CC} --print-file-name=crtend.o
_GCC_CRTENDS!= ${CC} --print-file-name=crtendS.o
_GCC_CRTI!= ${CC} --print-file-name=crti.o
_GCC_CRTN!= ${CC} --print-file-name=crtn.o
_GCC_CRTDIR!= dirname ${_GCC_CRTBEGIN}
_GCC_LIBGCCDIR!= dirname `${CC} --print-libgcc-file-name`
.else
_GCC_CRTBEGIN?= ${DESTDIR}/usr/lib/crtbegin.o
_GCC_CRTBEGINS?= ${DESTDIR}/usr/lib/crtbeginS.o
_GCC_CRTEND?= ${DESTDIR}/usr/lib/crtend.o
_GCC_CRTENDS?= ${DESTDIR}/usr/lib/crtendS.o
_GCC_CRTI?= ${DESTDIR}/usr/lib/crti.o
_GCC_CRTN?= ${DESTDIR}/usr/lib/crtn.o
_GCC_CRTDIR?= ${DESTDIR}/usr/lib
_GCC_LIBGCCDIR?= ${DESTDIR}/usr/lib
.endif
.if defined(__MINIX)
AFLAGS+=-D__ASSEMBLY__
CPPFLAGS+= -fno-builtin -Wall -Wno-sign-compare
.if ${MACHINE_ARCH} == "i386"
CPPFLAGS+= -march=i586
.elif ${MACHINE_ARCH} == "arm"
CPPFLAGS+= -march=armv7-a
CPPFLAGS+= -D__minix
.endif
# LSC In the current state there is too much to be done
# Some package have been identified by directly adding NOGCCERROR
# To their Makefiles
NOGCCERROR:= yes
NOCLANGERROR:= yes
.endif # defined(__MINIX)
.endif # ! defined(_BSD_GCC_MK_)