diff options
-rw-r--r-- | package/gettext/Makefile | 14 | ||||
-rw-r--r-- | package/pcc-libs/Makefile | 29 | ||||
-rw-r--r-- | package/pcc-libs/patches/100-adk.patch | 12 | ||||
-rw-r--r-- | package/pcc-libs/patches/patch-csu_linux_crtbegin_c | 35 | ||||
-rw-r--r-- | package/pcc-libs/patches/patch-csu_linux_crtend_c | 32 | ||||
-rw-r--r-- | package/pcc/Makefile | 46 | ||||
-rw-r--r-- | package/pcc/patches/100-adk.patch | 23 | ||||
-rw-r--r-- | package/pcc/patches/200-cc_ccom_Makefile_in.patch | 33 | ||||
-rw-r--r-- | package/pcc/patches/999-autoconf.patch | 38 |
9 files changed, 255 insertions, 7 deletions
diff --git a/package/gettext/Makefile b/package/gettext/Makefile index 665115d06..14d502958 100644 --- a/package/gettext/Makefile +++ b/package/gettext/Makefile @@ -52,24 +52,24 @@ CONFIGURE_ENV+= nls_cv_use_gnu_gettext=yes \ INSTALL_STYLE:= manual -libintl-install: +post-build: + ${INSTALL_DIR} ${STAGING_DIR}/usr/include ${STAGING_DIR}/usr/lib + $(CP) $(WRKBUILD)/gettext-runtime/intl/libintl.h ${STAGING_DIR}/usr/include + ${CP} ${WRKBUILD}/gettext-runtime/intl/.libs/libintl.so* \ + ${STAGING_DIR}/usr/lib + +post-install: ${INSTALL_DIR} ${IDIR_LIBINTL}/usr/lib ${CP} ${WRKBUILD}/gettext-runtime/intl/.libs/libintl.so* \ ${IDIR_LIBINTL}/usr/lib - -libintl-dev-install: ${INSTALL_DIR} ${IDIR_LIBINTL_DEV}/usr/include ${INSTALL_DATA} ${WRKBUILD}/gettext-runtime/intl/libintl.h \ ${IDIR_LIBINTL_DEV}/usr/include - -gettext-install: ${INSTALL_DIR} ${IDIR_GETTEXT}/usr/bin $(INSTALL_BIN) $(WRKBUILD)/gettext-tools/src/.libs/xgettext \ $(IDIR_GETTEXT)/usr/bin $(INSTALL_BIN) $(WRKBUILD)/gettext-runtime/src/.libs/gettext \ $(IDIR_GETTEXT)/usr/bin - -msgfmt-install: ${INSTALL_DIR} ${IDIR_MSGFMT}/usr/bin ${INSTALL_DIR} ${IDIR_MSGFMT}/usr/lib ${CP} ${WRKBUILD}/gettext-tools/libgettextpo/.libs/libgettextpo.so* \ diff --git a/package/pcc-libs/Makefile b/package/pcc-libs/Makefile new file mode 100644 index 000000000..9533b97c9 --- /dev/null +++ b/package/pcc-libs/Makefile @@ -0,0 +1,29 @@ +# 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 + +PKG_NAME:= pcc-libs +PKG_VERSION:= 1.0.0 +PKG_RELEASE:= 1 +PKG_MD5SUM:= a8dfcd6d3be512bc3f16f96c9abf132e +PKG_DESCR:= Runtime for the Portable C Compiler +PKG_SECTION:= lang +PKG_URL:= http://pcc.ludd.ltu.se/ +PKG_SITES:= http://pcc.ludd.ltu.se/ftp/pub/pcc-releases/ + +DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tgz + +include $(TOPDIR)/mk/package.mk + +$(eval $(call PKG_template,PCC_LIBS,pcc-libs,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) + +# we cross-compile a native compiler for the target system +CONFIGURE_ARGS+= --host=${REAL_GNU_TARGET_NAME} +CONFIGURE_ARGS+= --target=${REAL_GNU_TARGET_NAME} + +pcc-libs-install: + $(INSTALL_DIR) $(IDIR_PCC_LIBS)/usr/bin + cd ${WRKINST} && cp -r * ${IDIR_PCC_LIBS}/ + +include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/pcc-libs/patches/100-adk.patch b/package/pcc-libs/patches/100-adk.patch new file mode 100644 index 000000000..a588900d9 --- /dev/null +++ b/package/pcc-libs/patches/100-adk.patch @@ -0,0 +1,12 @@ +diff -pur pcc-libs-1.0.0~/csu/linux/Makefile pcc-libs-1.0.0/csu/linux/Makefile +--- pcc-libs-1.0.0.orig/csu/linux/Makefile 2009-08-13 11:16:46.000000000 +0200 ++++ pcc-libs-1.0.0/csu/linux/Makefile 2011-04-07 20:36:10.068600370 +0200 +@@ -4,7 +4,7 @@ VERSION ?= 0.9.9 + PCCLIBDIR ?= /usr/local/lib/pcc/$(TARGET)/$(VERSION)/lib + SRCDIR ?= . + +-CFLAGS = -I$(SRCDIR)/$(MACH) -I$(SRCDIR) -Wall -Wstrict-prototypes -Wmissing-prototypes ++CFLAGS += -I$(SRCDIR)/$(MACH) -I$(SRCDIR) -Wall -Wstrict-prototypes -Wmissing-prototypes + + OBJS = crt0.o crt1.o gcrt1.o crti.o crtn.o crtbegin.o crtend.o + diff --git a/package/pcc-libs/patches/patch-csu_linux_crtbegin_c b/package/pcc-libs/patches/patch-csu_linux_crtbegin_c new file mode 100644 index 000000000..a4f9777b3 --- /dev/null +++ b/package/pcc-libs/patches/patch-csu_linux_crtbegin_c @@ -0,0 +1,35 @@ +--- pcc-libs-1.0.0.orig/csu/linux/crtbegin.c 2009-08-17 01:07:07.000000000 +0200 ++++ pcc-libs-1.0.0/csu/linux/crtbegin.c 2011-04-12 08:36:48.951412645 +0200 +@@ -1,4 +1,4 @@ +-/* $Id: crtbegin.c,v 1.6 2009/08/16 23:07:07 gmcgarry Exp $ */ ++/* $Id: crtbegin.c,v 1.7 2011/04/12 04:44:19 gmcgarry Exp $ */ + /*- + * Copyright (c) 1998, 2001, 2002 The NetBSD Foundation, Inc. + * All rights reserved. +@@ -40,16 +40,16 @@ void __do_global_dtors_aux(void); + extern void (*__CTOR_LIST__[1])(void); + extern void (*__DTOR_LIST__[1])(void); + +-asm( " .section .ctors\n" +- " .align 2\n" ++asm( " .section .ctors,\"aw\",@progbits\n" ++ " .align 4\n" + "__CTOR_LIST__:\n" + #ifdef __x86_64__ + " .quad -1\n" + #else + " .long -1\n" + #endif +- " .section .dtors\n" +- " .align 2\n" ++ " .section .dtors,\"aw\",@progbits\n" ++ " .align 4\n" + "__DTOR_LIST__:\n" + #ifdef __x86_64__ + " .quad -1\n" +@@ -120,4 +120,4 @@ void __call_##func(void) \ + MD_CALL_STATIC_FUNCTION(.init, __do_global_ctors_aux) + MD_CALL_STATIC_FUNCTION(.fini, __do_global_dtors_aux) + +-IDENT("$Id: crtbegin.c,v 1.6 2009/08/16 23:07:07 gmcgarry Exp $"); ++IDENT("$Id: crtbegin.c,v 1.7 2011/04/12 04:44:19 gmcgarry Exp $"); diff --git a/package/pcc-libs/patches/patch-csu_linux_crtend_c b/package/pcc-libs/patches/patch-csu_linux_crtend_c new file mode 100644 index 000000000..257f7138f --- /dev/null +++ b/package/pcc-libs/patches/patch-csu_linux_crtend_c @@ -0,0 +1,32 @@ +--- pcc-libs-1.0.0.orig/csu/linux/crtend.c 2009-08-17 01:07:07.000000000 +0200 ++++ pcc-libs-1.0.0/csu/linux/crtend.c 2011-04-12 08:36:48.951412645 +0200 +@@ -1,4 +1,4 @@ +-/* $Id: crtend.c,v 1.3 2009/08/16 23:07:07 gmcgarry Exp $ */ ++/* $Id: crtend.c,v 1.4 2011/04/12 04:44:19 gmcgarry Exp $ */ + /*- + * Copyright (c) 2008 Gregory McGarry <g.mcgarry@ieee.org> + * +@@ -17,7 +17,7 @@ + + #include "common.h" + +-asm( " .section .ctors\n" ++asm( " .section .ctors,\"aw\",@progbits\n" + #ifdef __x86_64__ + " .quad 0\n" + #else +@@ -25,7 +25,7 @@ asm( " .section .ctors\n" + #endif + ); + +-asm( " .section .dtors\n" ++asm( " .section .dtors,\"aw\",@progbits\n" + #ifdef __x86_64__ + " .quad 0\n" + #else +@@ -33,4 +33,4 @@ asm( " .section .dtors\n" + #endif + ); + +-IDENT("$Id: crtend.c,v 1.3 2009/08/16 23:07:07 gmcgarry Exp $"); ++IDENT("$Id: crtend.c,v 1.4 2011/04/12 04:44:19 gmcgarry Exp $"); diff --git a/package/pcc/Makefile b/package/pcc/Makefile new file mode 100644 index 000000000..a20d3dece --- /dev/null +++ b/package/pcc/Makefile @@ -0,0 +1,46 @@ +# 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 + +PKG_NAME:= pcc +PKG_VERSION:= 1.0.0 +PKG_RELEASE:= 1 +PKG_MD5SUM:= 6e5d851ee57fe58702fe4e80ecd1f852 +PKG_DESCR:= Portable C Compiler +PKG_SECTION:= lang +PKG_DEPENDS:= pcc-libs +# binutils +PKG_URL:= http://pcc.ludd.ltu.se/ +PKG_SITES:= http://pcc.ludd.ltu.se/ftp/pub/pcc-releases/ +PKG_NOPARALLEL:= 1 + +DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tgz + +include $(TOPDIR)/mk/package.mk + +$(eval $(call PKG_template,PCC,pcc,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) + +# we cross-compile a native compiler for the target system +CONFIGURE_ARGS+= --host=${REAL_GNU_TARGET_NAME} +CONFIGURE_ARGS+= --target=${REAL_GNU_TARGET_NAME} +CONFIGURE_ARGS+= --with-assembler=/usr/bin/as +CONFIGURE_ARGS+= --with-linker=/usr/bin/ld + +ifeq ($(ADK_TARGET_LIB_GLIBC),y) +TARGET_CPPFLAGS+= -DADK_FOR_GLIBC +else +ifeq ($(ADK_TARGET_LIB_EGLIBC),y) +TARGET_CPPFLAGS+= -DADK_FOR_GLIBC +else +ifeq ($(ADK_TARGET_LIB_UCLIBC),y) +TARGET_CPPFLAGS+= -DADK_FOR_UCLIBC +endif +endif +endif + +pcc-install: + $(INSTALL_DIR) $(IDIR_PCC) + cd ${WRKINST} && cp -r * ${IDIR_PCC}/ + +include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/pcc/patches/100-adk.patch b/package/pcc/patches/100-adk.patch new file mode 100644 index 000000000..fe2143dd8 --- /dev/null +++ b/package/pcc/patches/100-adk.patch @@ -0,0 +1,23 @@ +Index: os/linux/ccconfig.h +=================================================================== +RCS file: /cvsroot/pcc/os/linux/ccconfig.h,v +retrieving revision 1.19 +diff -u -p -r1.19 ccconfig.h +--- a/os/linux/ccconfig.h 9 Nov 2010 08:40:50 -0000 1.19 ++++ b/os/linux/ccconfig.h 2 Apr 2011 14:19:17 -0000 +@@ -67,6 +67,15 @@ + #error defines for arch missing + #endif + ++#ifdef ADK_FOR_UCLIBC ++#undef DYNLINKER ++#define DYNLINKER { "-dynamic-linker", "/lib/ld-uClibc.so.0", NULL } ++#elif defined(ADK_FOR_GLIBC) ++/* see above */ ++#else ++#error What now? ++#endif ++ + #ifndef LIBDIR + #define LIBDIR "/usr/lib/" + #endif diff --git a/package/pcc/patches/200-cc_ccom_Makefile_in.patch b/package/pcc/patches/200-cc_ccom_Makefile_in.patch new file mode 100644 index 000000000..31e051edd --- /dev/null +++ b/package/pcc/patches/200-cc_ccom_Makefile_in.patch @@ -0,0 +1,33 @@ +$MirOS: ports/lang/pcc/patches/patch-cc_ccom_Makefile_in,v 1.4 2011/04/02 17:45:46 tg Exp $ + + • fix missing @CPPFLAGS@ + • fix cross-compiling + +--- a/cc/ccom/Makefile.in.orig Sun Apr 11 15:00:40 2010 ++++ b/cc/ccom/Makefile.in Sat Apr 2 17:43:44 2011 +@@ -11,9 +11,14 @@ XFL=-DPCC_DEBUG + CC = @CC@ + EXEEXT = @EXEEXT@ + CC_FOR_BUILD = @CC_FOR_BUILD@ ++CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@ ++CPPFLAGS_FOR_BUILD = @CPPFLAGS_FOR_BUILD@ -D_ISOC99_SOURCE \ ++ @ADD_CPPFLAGS@ ${XFL} -Dos_${TARGOS} -Dmach_${TARGMACH} \ ++ -I${srcdir} -I${builddir} -I${top_builddir} -I${MIPDIR} -I${MDIR} \ ++ -I${top_srcdir}/os/${TARGOS} + _CFLAGS = @CFLAGS@ + CFLAGS = $(_CFLAGS) @ADD_CFLAGS@ +-CPPFLAGS = @ADD_CPPFLAGS@ ${XFL} -Dos_${TARGOS} -Dmach_${TARGMACH} \ ++CPPFLAGS = @CPPFLAGS@ @ADD_CPPFLAGS@ ${XFL} -Dos_${TARGOS} -Dmach_${TARGMACH} \ + -D_ISOC99_SOURCE \ + -I${srcdir} -I${builddir} -I${top_builddir} -I${MIPDIR} -I${MDIR} \ + -I${top_srcdir}/os/${TARGOS} +@@ -92,7 +97,8 @@ compat.o: $(MIPDIR)/compat.c external.h + $(CC) $(DEFS) $(CPPFLAGS) $(CFLAGS) -c -o $@ $(MIPDIR)/compat.c + + external.h external.c: ${MIPDIR}/mkext.c $(MDIR)/table.c +- $(CC_FOR_BUILD) $(DEFS) $(CPPFLAGS) $(CFLAGS) -DMKEXT -o mkext \ ++ $(CC_FOR_BUILD) $(DEFS) $(CPPFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD) \ ++ -DMKEXT -o mkext \ + ${MIPDIR}/mkext.c $(MDIR)/table.c ${MIPDIR}/common.c + ./mkext + diff --git a/package/pcc/patches/999-autoconf.patch b/package/pcc/patches/999-autoconf.patch new file mode 100644 index 000000000..531b5291b --- /dev/null +++ b/package/pcc/patches/999-autoconf.patch @@ -0,0 +1,38 @@ +--- a/configure Fri Apr 1 13:58:07 2011 ++++ b/configure Sat Apr 2 19:21:15 2011 +@@ -672,6 +672,8 @@ ac_ct_CC + EXEEXT + OBJEXT + CC_FOR_BUILD ++CPPFLAGS_FOR_BUILD ++CFLAGS_FOR_BUILD + CPP + GREP + EGREP +@@ -3292,6 +3294,8 @@ else + echo "${ECHO_T}not cross compiling" >&6; } + CC_FOR_BUILD=${CC-cc} + ++ test -n "$CPPFLAGS_FOR_BUILD" || CPPFLAGS_FOR_BUILD=$CPPFLAGS ++ test -n "$CFLAGS_FOR_BUILD" || CFLAGS_FOR_BUILD=$CFLAGS + fi + + +@@ -5765,6 +5769,8 @@ ac_ct_CC!$ac_ct_CC$ac_delim + EXEEXT!$EXEEXT$ac_delim + OBJEXT!$OBJEXT$ac_delim + CC_FOR_BUILD!$CC_FOR_BUILD$ac_delim ++CPPFLAGS_FOR_BUILD!$CPPFLAGS_FOR_BUILD$ac_delim ++CFLAGS_FOR_BUILD!$CFLAGS_FOR_BUILD$ac_delim + CPP!$CPP$ac_delim + GREP!$GREP$ac_delim + EGREP!$EGREP$ac_delim +@@ -5787,7 +5793,7 @@ LIBOBJS!$LIBOBJS$ac_delim + LTLIBOBJS!$LTLIBOBJS$ac_delim + _ACEOF + +- if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 78; then ++ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 80; then + break + elif $ac_last_try; then + { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 |