| @@ -1,98 +1,98 @@ | | | @@ -1,98 +1,98 @@ |
1 | # $NetBSD: Makefile,v 1.1 2019/09/20 15:20:20 bouyer Exp $ | | 1 | # $NetBSD: Makefile,v 1.2 2019/12/19 22:10:35 joerg Exp $ |
2 | | | 2 | |
3 | # using configure options and sources from | | 3 | # using configure options and sources from |
4 | # https://github.com/earlephilhower/esp-quick-toolchain | | 4 | # https://github.com/earlephilhower/esp-quick-toolchain |
5 | | | 5 | |
6 | DISTNAME= gcc-xtensa-4.8.2 | | 6 | DISTNAME= gcc-xtensa-4.8.2 |
7 | PKGNAME= ${DISTNAME:C/gcc-xtensa/xtensa-lx106-elf-gcc/} | | 7 | PKGNAME= ${DISTNAME:C/gcc-xtensa/xtensa-lx106-elf-gcc/} |
8 | CATEGORIES= cross | | 8 | CATEGORIES= cross |
9 | MASTER_SITES= ${MASTER_SITE_GITHUB:=jcmvbkbc/} | | 9 | MASTER_SITES= ${MASTER_SITE_GITHUB:=jcmvbkbc/} |
10 | GITHUB_PROJECT= gcc-xtensa | | 10 | GITHUB_PROJECT= gcc-xtensa |
11 | GITHUB_TAG= a0936f8b396491bc7894c8bc5e80971cc9138e94 | | 11 | GITHUB_TAG= a0936f8b396491bc7894c8bc5e80971cc9138e94 |
12 | | | 12 | |
13 | DIST_SUBDIR= ${PKGNAME} | | 13 | DIST_SUBDIR= ${PKGNAME} |
14 | | | 14 | |
15 | # Custom xtensa newlib | | 15 | # Custom xtensa newlib |
16 | DISTFILES= ${DEFAULT_DISTFILES} | | 16 | DISTFILES= ${DEFAULT_DISTFILES} |
17 | DISTFILES+= newlib-${NEWLIBVER}.tar.gz | | 17 | DISTFILES+= newlib-${NEWLIBVER}.tar.gz |
18 | NEWLIBVER= xtensa-2_2_0-lock-arduino_20190913 | | 18 | NEWLIBVER= xtensa-2_2_0-lock-arduino_20190913 |
19 | SITES.newlib-${NEWLIBVER}.tar.gz= -https://github.com/earlephilhower/newlib-xtensa/archive/b350aadd0c7f44d5ec867494a795a0eed972ee9a.tar.gz | | 19 | SITES.newlib-${NEWLIBVER}.tar.gz= -https://github.com/earlephilhower/newlib-xtensa/archive/b350aadd0c7f44d5ec867494a795a0eed972ee9a.tar.gz |
20 | | | 20 | |
21 | # extra patches | | 21 | # extra patches |
22 | .for _p in \ | | 22 | .for _p in \ |
23 | gcc-ctype-inline-pgmread.patch \ | | 23 | gcc-ctype-inline-pgmread.patch \ |
24 | gcc-docs.patch \ | | 24 | gcc-docs.patch \ |
25 | gcc-enable-mforcel32-eh.patch \ | | 25 | gcc-enable-mforcel32-eh.patch \ |
26 | gcc-exception-emergency.patch \ | | 26 | gcc-exception-emergency.patch \ |
27 | gcc-exception-what-to-pmem.patch \ | | 27 | gcc-exception-what-to-pmem.patch \ |
28 | gcc-file-shortname.patch \ | | 28 | gcc-file-shortname.patch \ |
29 | gcc-fix-defaults-h-gcc7.patch \ | | 29 | gcc-fix-defaults-h-gcc7.patch \ |
30 | gcc-fix-elfos-h-gcc7.patch \ | | 30 | gcc-fix-elfos-h-gcc7.patch \ |
31 | gcc-gmpn_invert_limb.patch \ | | 31 | gcc-gmpn_invert_limb.patch \ |
32 | gcc-libc_name_p-fix.patch \ | | 32 | gcc-libc_name_p-fix.patch \ |
33 | gcc-mforce-l32-jcmvbkbc.patch \ | | 33 | gcc-mforce-l32-jcmvbkbc.patch \ |
34 | gcc-osx-malloc.patch \ | | 34 | gcc-osx-malloc.patch \ |
35 | gcc-stdcsupp-safe.patch \ | | 35 | gcc-stdcsupp-safe.patch \ |
36 | gcc-unwind-safe.patch | | 36 | gcc-unwind-safe.patch |
37 | PATCHFILES+= ${_p} | | 37 | PATCHFILES+= ${_p} |
38 | .endfor | | 38 | .endfor |
39 | PATCH_SITES+= https://raw.githubusercontent.com/earlephilhower/esp-quick-toolchain/master/patches/gcc4.8/ | | 39 | PATCH_SITES+= https://raw.githubusercontent.com/earlephilhower/esp-quick-toolchain/master/patches/gcc4.8/ |
40 | | | 40 | |
41 | PATCHFILES+= gcc-001-jump-tables-in-text-section-earlephilhower.patch | | 41 | PATCHFILES+= gcc-001-jump-tables-in-text-section-earlephilhower.patch |
42 | PATCH_SITES+= https://github.com/earlephilhower/esp-quick-toolchain/raw/master/patches/ | | 42 | PATCH_SITES+= https://github.com/earlephilhower/esp-quick-toolchain/raw/master/patches/ |
43 | PATCH_DIST_STRIP= -p1 | | 43 | PATCH_DIST_STRIP= -p1 |
44 | | | 44 | |
45 | MAINTAINER= bouyer@NetBSD.org | | 45 | MAINTAINER= bouyer@NetBSD.org |
46 | HOMEPAGE= https://github.com/espressif/gcc | | 46 | HOMEPAGE= https://github.com/espressif/gcc |
47 | COMMENT= Cross GCC for Espressif ESP8266 bare metal environment | | 47 | COMMENT= Cross GCC for Espressif ESP8266 bare metal environment |
48 | LICENSE= gnu-gpl-v2 AND gnu-gpl-v3 AND gnu-lgpl-v2 AND gnu-lgpl-v3 | | 48 | LICENSE= gnu-gpl-v2 AND gnu-gpl-v3 AND gnu-lgpl-v2 AND gnu-lgpl-v3 |
49 | | | 49 | |
50 | DEPENDS+= xtensa-lx106-elf-binutils-[0-9]*:../../cross/xtensa-lx106-elf-binutils | | 50 | DEPENDS+= xtensa-lx106-elf-binutils-[0-9]*:../../cross/xtensa-lx106-elf-binutils |
51 | | | 51 | |
52 | FILESDIR= ${.CURDIR}/../../cross/xtensa-lx106-elf-binutils/files | | 52 | FILESDIR= ${.CURDIR}/../../cross/xtensa-lx106-elf-binutils/files |
53 | | | 53 | |
54 | GNU_CONFIGURE= yes | | 54 | GNU_CONFIGURE= yes |
55 | INFO_FILES= yes | | 55 | INFO_FILES= yes |
56 | USE_LANGUAGES+= c c++ | | 56 | USE_LANGUAGES+= c c++03 |
57 | USE_TOOLS+= bash gmake makeinfo perl | | 57 | USE_TOOLS+= bash gmake makeinfo perl |
58 | | | 58 | |
59 | # for http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33549 | | 59 | # for http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33549 |
60 | # use makeinfo from pkgsrc/devel/gtexinfo. | | 60 | # use makeinfo from pkgsrc/devel/gtexinfo. |
61 | TOOL_DEPENDS+= gtexinfo>=5.1:../../devel/gtexinfo | | 61 | TOOL_DEPENDS+= gtexinfo>=5.1:../../devel/gtexinfo |
62 | _TOOLS_USE_PKGSRC.makeinfo= yes | | 62 | _TOOLS_USE_PKGSRC.makeinfo= yes |
63 | | | 63 | |
64 | OBJDIR= ../build | | 64 | OBJDIR= ../build |
65 | CONFIGURE_DIRS= ${OBJDIR} | | 65 | CONFIGURE_DIRS= ${OBJDIR} |
66 | CONFIGURE_SCRIPT= ${WRKSRC}/configure | | 66 | CONFIGURE_SCRIPT= ${WRKSRC}/configure |
67 | CONFIG_SHELL= ${TOOLS_PATH.bash} | | 67 | CONFIG_SHELL= ${TOOLS_PATH.bash} |
68 | WRAPPER_SHELL= ${TOOLS_PATH.bash} | | 68 | WRAPPER_SHELL= ${TOOLS_PATH.bash} |
69 | GNU_CONFIGURE_PREFIX= ${PREFIX}/xtensa-lx106-elf | | 69 | GNU_CONFIGURE_PREFIX= ${PREFIX}/xtensa-lx106-elf |
70 | | | 70 | |
71 | CONFIGURE_ARGS+= --enable-languages=c,c++ | | 71 | CONFIGURE_ARGS+= --enable-languages=c,c++ |
72 | CONFIGURE_ARGS+= --target=xtensa-lx106-elf | | 72 | CONFIGURE_ARGS+= --target=xtensa-lx106-elf |
73 | CONFIGURE_ARGS+= --disable-shared | | 73 | CONFIGURE_ARGS+= --disable-shared |
74 | CONFIGURE_ARGS+= --with-newlib | | 74 | CONFIGURE_ARGS+= --with-newlib |
75 | CONFIGURE_ARGS+= --enable-threads=no | | 75 | CONFIGURE_ARGS+= --enable-threads=no |
76 | CONFIGURE_ARGS+= --disable-__cxa_atexit | | 76 | CONFIGURE_ARGS+= --disable-__cxa_atexit |
77 | CONFIGURE_ARGS+= --disable-libgomp | | 77 | CONFIGURE_ARGS+= --disable-libgomp |
78 | CONFIGURE_ARGS+= --disable-libmudflap | | 78 | CONFIGURE_ARGS+= --disable-libmudflap |
79 | CONFIGURE_ARGS+= --disable-nls | | 79 | CONFIGURE_ARGS+= --disable-nls |
80 | CONFIGURE_ARGS+= --disable-multilib | | 80 | CONFIGURE_ARGS+= --disable-multilib |
81 | CONFIGURE_ARGS+= --disable-bootstrap | | 81 | CONFIGURE_ARGS+= --disable-bootstrap |
82 | CONFIGURE_ARGS+= --enable-languages=c,c++ | | 82 | CONFIGURE_ARGS+= --enable-languages=c,c++ |
83 | CONFIGURE_ARGS+= --enable-lto | | 83 | CONFIGURE_ARGS+= --enable-lto |
84 | CONFIGURE_ARGS+= --enable-static=yes | | 84 | CONFIGURE_ARGS+= --enable-static=yes |
85 | CONFIGURE_ARGS+= --disable-libstdcxx-verbose | | 85 | CONFIGURE_ARGS+= --disable-libstdcxx-verbose |
86 | | | 86 | |
87 | post-extract: | | 87 | post-extract: |
88 | ${LN} -s ${WRKDIR}/newlib-*/newlib ${WRKSRC}/newlib | | 88 | ${LN} -s ${WRKDIR}/newlib-*/newlib ${WRKSRC}/newlib |
89 | ${LN} -s ${WRKDIR}/newlib-*/libgloss ${WRKSRC}/libgloss | | 89 | ${LN} -s ${WRKDIR}/newlib-*/libgloss ${WRKSRC}/libgloss |
90 | | | 90 | |
91 | pre-configure: | | 91 | pre-configure: |
92 | ${RUN} cd ${WRKSRC} && ${MKDIR} ${OBJDIR} | | 92 | ${MKDIR} ${WRKSRC}/${OBJDIR} |
93 | ${CP} ${FILESDIR}/xtensa-config.h ${WRKSRC}/include/xtensa-config.h | | 93 | ${CP} ${FILESDIR}/xtensa-config.h ${WRKSRC}/include/xtensa-config.h |
94 | | | 94 | |
95 | .include "../../devel/gmp/buildlink3.mk" | | 95 | .include "../../devel/gmp/buildlink3.mk" |
96 | .include "../../math/mpfr/buildlink3.mk" | | 96 | .include "../../math/mpfr/buildlink3.mk" |
97 | .include "../../math/mpcomplex/buildlink3.mk" | | 97 | .include "../../math/mpcomplex/buildlink3.mk" |
98 | .include "../../mk/bsd.pkg.mk" | | 98 | .include "../../mk/bsd.pkg.mk" |