Skip to content

Commit

Permalink
mipsel-none-elf-gcc: Import version 8.3.0
Browse files Browse the repository at this point in the history
Copied mainly from cross/powerpc-none-elf-gcc.
  • Loading branch information
thorpej committed Jun 20, 2020
1 parent 816048d commit cd9a456
Show file tree
Hide file tree
Showing 9 changed files with 1,789 additions and 0 deletions.
1 change: 1 addition & 0 deletions cross/mipsel-none-elf-gcc/DESCR
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
GCC for bare metal MIPS 32-bit little-endian ELF environment with newlib.
61 changes: 61 additions & 0 deletions cross/mipsel-none-elf-gcc/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# $NetBSD: Makefile,v 1.1 2020/06/20 14:33:35 thorpej Exp $

DISTNAME= gcc-8.3.0
PKGNAME= cross-mipsel-none-elf-${DISTNAME}
CATEGORIES= cross
NEWLIBVER= 3.1.0
MASTER_SITES= ${MASTER_SITE_GNU:=gcc/gcc-${PKGVERSION_NOREV}/}
EXTRACT_SUFX= .tar.xz
DISTFILES= ${DEFAULT_DISTFILES} \
newlib-${NEWLIBVER}.tar.gz
SITES.newlib-${NEWLIBVER}.tar.gz= https://www.sourceware.org/pub/newlib/

MAINTAINER= [email protected]
HOMEPAGE= # none
COMMENT= GCC for bare metal MIPS 32-bit little-endian ELF

EXTRACT_USING= bsdtar

# for http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33549
# use makeinfo from pkgsrc/devel/gtexinfo.
TOOL_DEPENDS+= gtexinfo>=5.1:../../devel/gtexinfo
_TOOLS_USE_PKGSRC.makeinfo= yes

DEPENDS+= cross-mipsel-none-elf-binutils-[0-9]*:../../cross/mipsel-none-elf-binutils

USE_LANGUAGES+= c c++

MIPSELELF_PREFIX= ${PREFIX}/cross-mipsel-none-elf
OBJDIR= ../build
CONFIGURE_DIRS= ${OBJDIR}
CONFIGURE_SCRIPT= ${WRKSRC}/configure

CONFIG_SHELL= ${TOOLS_PATH.bash}
WRAPPER_SHELL= ${TOOLS_PATH.bash}
USE_TOOLS+= bash gmake gsed makeinfo perl

GNU_CONFIGURE= yes
GNU_CONFIGURE_STRICT= no # has sub-configures
CHECK_PORTABILITY_SKIP+= contrib/* # not needed for building

GNU_CONFIGURE_PREFIX= ${MIPSELELF_PREFIX}

CONFIGURE_ARGS+= --target=mipsel-none-elf
CONFIGURE_ARGS+= --enable-languages=c,c++
CONFIGURE_ARGS+= --with-newlib
CONFIGURE_ARGS+= --disable-nls
CONFIGURE_ARGS+= --disable-libstdcxx-pch

INFO_FILES= yes

post-extract:
${LN} -s ${WRKDIR}/newlib-${NEWLIBVER}/newlib ${WRKSRC}/newlib
${LN} -s ${WRKDIR}/newlib-${NEWLIBVER}/libgloss ${WRKSRC}/libgloss

pre-configure:
${RUN} cd ${WRKSRC} && ${MKDIR} ${OBJDIR}

.include "../../devel/gmp/buildlink3.mk"
.include "../../math/mpfr/buildlink3.mk"
.include "../../math/mpcomplex/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
1,618 changes: 1,618 additions & 0 deletions cross/mipsel-none-elf-gcc/PLIST

Large diffs are not rendered by default.

15 changes: 15 additions & 0 deletions cross/mipsel-none-elf-gcc/distinfo
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
$NetBSD: distinfo,v 1.1 2020/06/20 14:33:35 thorpej Exp $

SHA1 (gcc-8.3.0.tar.xz) = c27f4499dd263fe4fb01bcc5565917f3698583b2
RMD160 (gcc-8.3.0.tar.xz) = 59396f7136301466d0ec15eb7307558c0da692df
SHA512 (gcc-8.3.0.tar.xz) = 1811337ae3add9680cec64968a2509d085b6dc5b6783fc1e8c295e3e47416196fd1a3ad8dfe7e10be2276b4f62c357659ce2902f239f60a8648548231b4b5802
Size (gcc-8.3.0.tar.xz) = 63694700 bytes
SHA1 (newlib-3.1.0.tar.gz) = 6c0e467345ca6832eff6add85124c6e81e11d174
RMD160 (newlib-3.1.0.tar.gz) = bf4f474ef482a8ba0b2d57254051d79c48c5a633
SHA512 (newlib-3.1.0.tar.gz) = efc4c3ab7153387780d141386bca5d3e20c9d25ae3e6b87cf94c8df9d301ce5926dacdff9bd33aeb9781559d933c3d0ae77f4e5b46120d90792f75dbfde702c7
Size (newlib-3.1.0.tar.gz) = 17958952 bytes
SHA1 (patch-contrib_download__prerequisites) = be9b02068b3d4d783e92bee66d480bb2bfe35a84
SHA1 (patch-gcc_system.h) = 72a75ff773b9b5f3d2f16f4ec7d29e032aba5f53
SHA1 (patch-libcc1_configure) = 0368733ddf79b109fcc7146b0baeb37ab31e634a
SHA1 (patch-libcc1_connection.cc) = 2acd56a6f62b29ed3f02eecb7bf103e4564a442c
SHA1 (patch-libiberty_Makefile.in) = 7ea2578b5b77cb4adcd4afe3d63739efc68a1540
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
$NetBSD: patch-contrib_download__prerequisites,v 1.1 2020/06/20 14:33:35 thorpej Exp $

* POSIX shell portability

--- contrib/download_prerequisites.orig 2017-04-11 16:34:07.000000000 +0000
+++ contrib/download_prerequisites
@@ -122,7 +122,7 @@ md5_check() {
md5_checksum_output=$(md5 -r "${file_to_check}")
# Grab the text before the first space
md5_checksum_detected="${md5_checksum_output%% *}"
- [ "${md5_checksum_expected}" == "${md5_checksum_detected}" ] \
+ [ "${md5_checksum_expected}" = "${md5_checksum_detected}" ] \
|| die "Cannot verify integrity of possibly corrupted file ${file_to_check}"
echo "${file_to_check}: OK"
}
14 changes: 14 additions & 0 deletions cross/mipsel-none-elf-gcc/patches/patch-gcc_system.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
$NetBSD: patch-gcc_system.h,v 1.1 2020/06/20 14:33:35 thorpej Exp $

--- gcc/system.h.orig 2015-01-05 12:33:28.000000000 +0000
+++ gcc/system.h
@@ -44,6 +44,9 @@ along with GCC; see the file COPYING3.
#endif

#include <stdio.h>
+#ifdef __cplusplus
+# include <cstdio>
+#endif

/* Define a generic NULL if one hasn't already been defined. */
#ifndef NULL
16 changes: 16 additions & 0 deletions cross/mipsel-none-elf-gcc/patches/patch-libcc1_configure
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
$NetBSD: patch-libcc1_configure,v 1.1 2020/06/20 14:33:35 thorpej Exp $

Disable multi-os install dir for libcc1

--- libcc1/configure.orig 2014-11-21 16:49:17.000000000 +0000
+++ libcc1/configure
@@ -14366,9 +14366,6 @@ fi


libsuffix=
-if test "$GXX" = yes; then
- libsuffix=`$CXX -print-multi-os-directory`
-fi


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket libraries" >&5
12 changes: 12 additions & 0 deletions cross/mipsel-none-elf-gcc/patches/patch-libcc1_connection.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
$NetBSD: patch-libcc1_connection.cc,v 1.1 2020/06/20 14:33:35 thorpej Exp $

--- libcc1/connection.cc.orig 2014-11-13 10:22:22.000000000 +0000
+++ libcc1/connection.cc
@@ -23,6 +23,7 @@ along with GCC; see the file COPYING3.
#include <sys/types.h>
#include <string.h>
#include <errno.h>
+#include <sys/select.h>
#include "marshall.hh"
#include "connection.hh"
#include "rpc.hh"
37 changes: 37 additions & 0 deletions cross/mipsel-none-elf-gcc/patches/patch-libiberty_Makefile.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
$NetBSD: patch-libiberty_Makefile.in,v 1.1 2020/06/20 14:33:35 thorpej Exp $

--- libiberty/Makefile.in.orig 2014-12-24 16:22:51.000000000 +0000
+++ libiberty/Makefile.in
@@ -363,13 +363,12 @@ install-strip: install
# multilib-specific flags, it's overridden by FLAGS_TO_PASS from the
# default multilib, so we have to take CFLAGS into account as well,
# since it will be passed the multilib flags.
-MULTIOSDIR = `$(CC) $(CFLAGS) -print-multi-os-directory`
install_to_libdir: all
if test -n "${target_header_dir}"; then \
- ${mkinstalldirs} $(DESTDIR)$(libdir)/$(MULTIOSDIR); \
- $(INSTALL_DATA) $(TARGETLIB) $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB)n; \
- ( cd $(DESTDIR)$(libdir)/$(MULTIOSDIR) ; chmod 644 $(TARGETLIB)n ;$(RANLIB) $(TARGETLIB)n ); \
- mv -f $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB)n $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB); \
+ ${mkinstalldirs} $(DESTDIR)$(libdir); \
+ $(INSTALL_DATA) $(TARGETLIB) $(DESTDIR)$(libdir)/$(TARGETLIB)n; \
+ ( cd $(DESTDIR)$(libdir) ; chmod 644 $(TARGETLIB)n ;$(RANLIB) $(TARGETLIB)n ); \
+ mv -f $(DESTDIR)$(libdir)/$(TARGETLIB)n $(DESTDIR)$(libdir)/$(TARGETLIB); \
case "${target_header_dir}" in \
/*) thd=${target_header_dir};; \
*) thd=${includedir}/${target_header_dir};; \
@@ -382,10 +381,10 @@ install_to_libdir: all
@$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=install

install_to_tooldir: all
- ${mkinstalldirs} $(DESTDIR)$(tooldir)/lib/$(MULTIOSDIR)
- $(INSTALL_DATA) $(TARGETLIB) $(DESTDIR)$(tooldir)/lib/$(MULTIOSDIR)/$(TARGETLIB)n
- ( cd $(DESTDIR)$(tooldir)/lib/$(MULTIOSDIR) ; chmod 644 $(TARGETLIB)n; $(RANLIB) $(TARGETLIB)n )
- mv -f $(DESTDIR)$(tooldir)/lib/$(MULTIOSDIR)/$(TARGETLIB)n $(DESTDIR)$(tooldir)/lib/$(MULTIOSDIR)/$(TARGETLIB)
+ ${mkinstalldirs} $(DESTDIR)$(tooldir)/lib
+ $(INSTALL_DATA) $(TARGETLIB) $(DESTDIR)$(tooldir)/lib/$(TARGETLIB)n
+ ( cd $(DESTDIR)$(tooldir)/lib ; chmod 644 $(TARGETLIB)n; $(RANLIB) $(TARGETLIB)n )
+ mv -f $(DESTDIR)$(tooldir)/lib/$(TARGETLIB)n $(DESTDIR)$(tooldir)/lib/$(TARGETLIB)
@$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=install

# required-list was used when building a shared bfd/opcodes/libiberty

0 comments on commit cd9a456

Please sign in to comment.