summaryrefslogtreecommitdiff
path: root/package/gcc/Makefile
blob: 14328595e4b527ba527b371e9c88cdc9186135f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# $Id$
#-
# This file is part of the OpenADK project. OpenADK is copyrighted
# material, please see the LICENCE file in the top-level directory.

include ${TOPDIR}/rules.mk
include ${TOPDIR}/toolchain/gcc/Makefile.inc

PKG_DESCR:=		GNU compiler collection
PKG_SECTION:=		comp
PKG_DEPENDS:=		mpfr

include ${TOPDIR}/mk/package.mk

$(eval $(call PKG_template,GCC,gcc,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))

TCFLAGS:=		''
TCPPFLAGS:=		''
CONFIGURE_STYLE=	gnu
ifeq ($(ADK_LINUX_MIPS64_LEMOTE),y)
CONFIGURE_ARGS+=	--with-abi=64
endif
CONFIGURE_ENV+=		ac_cv_func_fputc_unlocked=no
CONFIGURE_ARGS+=	--enable-languages=c \
			--libexecdir=/usr/lib \
			--host=$(REAL_GNU_TARGET_NAME) \
			--target=$(REAL_GNU_TARGET_NAME) \
			--disable-__cxa_atexit \
			--without-headers \
			--with-gnu-ld \
			--disable-libssp \
			--disable-nls \
			--disable-libmudflap \
			--disable-libgomp \
			--disable-multilib
BUILD_STYLE:=		auto
ALL_TARGET:=		all-gcc all-target-libgcc
INSTALL_STYLE:=		auto
INSTALL_TARGET:=	install-gcc install-target-libgcc

post-install:
	${INSTALL_DIR} ${IDIR_GCC}/usr/lib/gcc ${IDIR_GCC}/usr/bin
	${INSTALL_BIN} ${WRKINST}/usr/bin/gcc ${IDIR_GCC}/usr/bin/
	${INSTALL_BIN} ${WRKINST}/usr/bin/cpp ${IDIR_GCC}/usr/bin/
	${CP} ${WRKINST}/usr/lib/gcc/* ${IDIR_GCC}/usr/lib/gcc/
ifeq ($(ADK_TARGET_LIB_GLIBC),y)
	${CP} ${STAGING_DIR}/usr/lib/crt* ${IDIR_GCC}/usr/lib
else
	${CP} ${STAGING_DIR}/lib/crt* ${IDIR_GCC}/usr/lib
endif
	rm -rf ${IDIR_GCC}/usr/lib/gcc/*/*/include-fixed
	rm -rf ${IDIR_GCC}/usr/lib/gcc/*/*/install-tools

include ${TOPDIR}/mk/pkg-bottom.mk