Skip to content

Commit

Permalink
Apply our GCC diffs.
Browse files Browse the repository at this point in the history
 - Add ALTERNATIVES files for lang/gcc4[789]
 - Include the .o files from gcc4[79] in the -libs packages.
 - Set LOCAL_INCLUDE_DIR to LOCALBASE.
 - Disable -fomit-frame-pointer, we like stack traces.
 - DATASET-953 disable full gcc47 dependency
 - Implement -fstrict-calling-conventions, from richlowe.
 - Cleanup DEPENDS when using -libs
 - Fix check-shlibs in -libs
 - Fix TritonDataCenter/pkgsrc#264 (avoid tls emulation)
 - Fix TritonDataCenter/pkgsrc#270 (disable fixincludes)
  • Loading branch information
Jonathan Perkin committed Mar 30, 2016
1 parent f301b03 commit d1c9624
Show file tree
Hide file tree
Showing 25 changed files with 400 additions and 19 deletions.
17 changes: 15 additions & 2 deletions lang/gcc47-libs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ CHECK_SHLIBS= no
## Depend on exactly ${GCC47_DIST_VERSION}.
BUILD_DEPENDS+= ${GCC_PKGNAME}-${GCC47_DIST_VERSION}{,nb[0-9]*}:../../lang/gcc47

# Finds libs from gcc47 due to rpath
CHECK_SHLIBS= no

.include "../../mk/bsd.prefs.mk"

LIBGCC_SUBPREFIX= ${GCC_PKGNAME}
Expand All @@ -41,9 +44,11 @@ SHLIB_EXT= so
.endif

LIBRARY_FILES= ${WRKDIR}/lib_files
OBJECT_FILES= ${WRKDIR}/obj_files

GENERATE_PLIST+= ${SED} -e 's,^,${LIBGCC_SUBPREFIX}/${GCC_TARGET_MACHINE}/,' \
${LIBRARY_FILES};
-e 's,gcc/${MACHINE_GNU_PLATFORM}/${GCC47_DIST_VERSION}/,,' \
${LIBRARY_FILES} ${OBJECT_FILES};
GENERATE_PLIST+= ${GREP} -q 'lib/' ${LIBRARY_FILES} || \
${ECHO} '@pkgdir ${LIBGCC_SUBPREFIX}/${GCC_TARGET_MACHINE}/lib' ;

Expand All @@ -53,11 +58,19 @@ ${LIBRARY_FILES}:
-e'/libgcj/d;/libgij/d;/libgo\./d;/libjvm/d' \
-e'/lib.*\.${SHLIB_EXT}/p' >${LIBRARY_FILES}

do-install: ${LIBRARY_FILES}
${OBJECT_FILES}:
${PKG_INFO} -qL '${GCC_PKGNAME}-${GCC47_DIST_VERSION}*' | \
${SED} -n -e's,^${LIBGCC_PREFIX}/,,' \
-e'/\.o/p' >${OBJECT_FILES}

do-install: ${LIBRARY_FILES} ${OBJECT_FILES}
${TEST} -d ${DESTDIR}${LIBGCC_PREFIX}/${GCC_TARGET_MACHINE}/lib || \
${MKDIR} ${DESTDIR}${LIBGCC_PREFIX}/${GCC_TARGET_MACHINE}/lib
cd ${LIBGCC_PREFIX} && \
${PAX} -rw ${DESTDIR}${LIBGCC_PREFIX}/${GCC_TARGET_MACHINE} <${LIBRARY_FILES}
cd ${LIBGCC_PREFIX} && \
${PAX} -r -s ',gcc/${MACHINE_GNU_PLATFORM}/${GCC47_DIST_VERSION}/,,' \
-w ${DESTDIR}${LIBGCC_PREFIX}/${GCC_TARGET_MACHINE} <${OBJECT_FILES}

.include "../../mk/dlopen.buildlink3.mk"
.include "../../mk/pthread.buildlink3.mk"
Expand Down
20 changes: 20 additions & 0 deletions lang/gcc47/ALTERNATIVES
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
bin/c++ @PREFIX@/gcc47/bin/c++
bin/cc @PREFIX@/gcc47/bin/cc
bin/cpp @PREFIX@/gcc47/bin/cpp
bin/g++ @PREFIX@/gcc47/bin/g++
bin/gcc @PREFIX@/gcc47/bin/gcc
bin/gcc-ar @PREFIX@/gcc47/bin/gcc-ar
bin/gcc-nm @PREFIX@/gcc47/bin/gcc-nm
bin/gcc-ranlib @PREFIX@/gcc47/bin/gcc-ranlib
bin/gccgo @PREFIX@/gcc47/bin/gccgo
bin/gcov @PREFIX@/gcc47/bin/gcov
bin/gfortran @PREFIX@/gcc47/bin/gfortran
bin/@MACHINE_GNU_PLATFORM@-c++ @PREFIX@/gcc47/bin/@MACHINE_GNU_PLATFORM@-c++
bin/@MACHINE_GNU_PLATFORM@-g++ @PREFIX@/gcc47/bin/@MACHINE_GNU_PLATFORM@-g++
bin/@MACHINE_GNU_PLATFORM@-gcc @PREFIX@/gcc47/bin/@MACHINE_GNU_PLATFORM@-gcc
bin/@MACHINE_GNU_PLATFORM@-gcc-@GCC47_DIST_VERSION@ @PREFIX@/gcc47/bin/@MACHINE_GNU_PLATFORM@-gcc-@GCC47_DIST_VERSION@
bin/@MACHINE_GNU_PLATFORM@-gcc-ar @PREFIX@/gcc47/bin/@MACHINE_GNU_PLATFORM@-gcc-ar
bin/@MACHINE_GNU_PLATFORM@-gcc-nm @PREFIX@/gcc47/bin/@MACHINE_GNU_PLATFORM@-gcc-nm
bin/@MACHINE_GNU_PLATFORM@-gcc-ranlib @PREFIX@/gcc47/bin/@MACHINE_GNU_PLATFORM@-gcc-ranlib
bin/@MACHINE_GNU_PLATFORM@-gccgo @PREFIX@/gcc47/bin/@MACHINE_GNU_PLATFORM@-gccgo
bin/@MACHINE_GNU_PLATFORM@-gfortran @PREFIX@/gcc47/bin/@MACHINE_GNU_PLATFORM@-gfortran
5 changes: 4 additions & 1 deletion lang/gcc47/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ INFO_FILES= yes
UNLIMIT_RESOURCES+= datasize
UNLIMIT_RESOURCES+= stacksize

FILES_SUBST+= GCC47_DIST_VERSION=${GCC47_DIST_VERSION}
FILES_SUBST+= MACHINE_GNU_PLATFORM=${MACHINE_GNU_PLATFORM}

SUBST_CLASSES+= vars
SUBST_STAGE.vars= pre-configure
SUBST_FILES.vars= gcc/Makefile.in
Expand Down Expand Up @@ -71,7 +74,7 @@ CONFIGURE_ENV+= LDFLAGS_FOR_TARGET=${LDFLAGS_FOR_TARGET:Q}
CONFIGURE_ARGS+= --enable-languages=${LANGS:Q}
CONFIGURE_ARGS+= --enable-shared
CONFIGURE_ARGS+= --enable-long-long
CONFIGURE_ARGS+= --with-local-prefix=${GCC_PREFIX:Q}
CONFIGURE_ARGS+= --with-local-prefix=${LOCALBASE:Q}
CONFIGURE_ARGS+= --enable-libssp
CONFIGURE_ARGS+= --enable-threads=posix
CONFIGURE_ARGS+= --with-boot-ldflags=${BOOT_LDFLAGS:Q}
Expand Down
2 changes: 1 addition & 1 deletion lang/gcc47/buildlink3.mk
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ BUILDLINK_FILES.gcc47= #empty
BUILDLINK_AUTO_VARS.gcc47= no

# Packages that link against shared libraries need a full dependency.
.if defined(_USE_GCC_SHLIB)
.if defined(_USE_GCC_SHLIB) && empty(USE_PKGSRC_GCC_RUNTIME:M[Yy][Ee][Ss])
DEPENDS+= {gcc47,gcc47-libs}>=4.7:../../lang/gcc47-libs
ABI_DEPENDS+= {gcc47,gcc47-libs}>=4.7.0:../../lang/gcc47-libs
.endif
Expand Down
9 changes: 7 additions & 2 deletions lang/gcc47/distinfo
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,23 @@ RMD160 (gcc-4.7.4.tar.bz2) = d0a8e421b9c62a923f765b97828b12d5af388199
SHA512 (gcc-4.7.4.tar.bz2) = dfcb737073191e628231031a3571ec77ee760a59377630f4a6e4fdfa66f9ddad39fde47e3f0f227eb43cdf90e0d34cde5abdc9ac892c1e111a911062a66c9189
Size (gcc-4.7.4.tar.bz2) = 82935453 bytes
SHA1 (patch-configure) = 51c0978c60baddd90ef7e512445fdef913c04e6c
SHA1 (patch-gcc_Makefile.in) = a61187af64943ef38088442397fcd0f3f65fe2b5
SHA1 (patch-gcc_Makefile.in) = ab307ae9f48bd05b4fafca5c618588ef3d37408d
SHA1 (patch-gcc_caller-save.c) = 85d985d1fd9736908be6e99028aa5fe7dcadca59
SHA1 (patch-gcc_common.opt) = 0f1212c9f9ab4a73e4ac6d56ebffbb89477f1e31
SHA1 (patch-gcc_config.gcc) = efa4ecabd71bdec14d5dd1f8bb836116c7a9d6e9
SHA1 (patch-gcc_config_dragonfly-stdint.h) = 740dc819b446d5f1476506322c4b280ffdb5a6c0
SHA1 (patch-gcc_config_dragonfly.h) = 82f549cdc7543b4bf413a44d481ef42b10f59c82
SHA1 (patch-gcc_config_dragonfly.opt) = 92f615c73c2e94664bae5b5935ab8b09bca15f73
SHA1 (patch-gcc_config_i386_dragonfly.h) = 0d3f785434c02beb9c4561fe59842a970e8f7896
SHA1 (patch-gcc_config_i386_i386.c) = 7b452589ae5deb228236529166bf096fda40718a
SHA1 (patch-gcc_config_netbsd-stdint.h) = 025fc883101a187e84ed4c0772406720d645d550
SHA1 (patch-gcc_config_sol2.h) = 4f6ffe871840dcf7e2e469fdcc5d327b9b00f957
SHA1 (patch-gcc_configure) = a4b670d0c54c410d38715b7a2a572a7048e3ec5e
SHA1 (patch-gcc_configure) = 01464863f31087390d612023a849e9c8f626b751
SHA1 (patch-gcc_dojump.c) = 6a095ae23d0ed0469dbcf746bcbefc3f33613482
SHA1 (patch-gcc_fortran_f95-lang.c) = 6edd2adc7de0d6db36fc5670535b55f61664f5fd
SHA1 (patch-gcc_gcc.c) = d28e633c8961161562db960054aaa5aa6a1ac645
SHA1 (patch-gcc_ginclude_stddef.h) = 87d7c2ff4400ad0719b2351d2f4c4b05bd257db3
SHA1 (patch-gcc_ira.c) = 48ce489c48eb5b618ba58db89bd32f737fa3f96c
SHA1 (patch-gcc_testsuite_g++.dg_eh_unwind-direct.C) = fd85ccee102e9618a8010d2dcbb2d9916b28f1cc
SHA1 (patch-include_libiberty.h) = ad2c64e9a14405c89b02ff68811b1c889405d0a1
SHA1 (patch-libgcc_config.host) = 6b54e18c6348c4aeb3fda3093fbe990b59456af7
Expand Down
15 changes: 13 additions & 2 deletions lang/gcc47/patches/patch-gcc_Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,24 @@ are found.

NOTE: the %M spec string is added by patch-gcc_gcc.c

--- gcc/Makefile.in.orig 2012-03-07 10:59:56.000000000 +0000
Disable fixincludes, as per joyent/pkgsrc#270

--- gcc/Makefile.in.orig 2013-07-08 09:15:35.000000000 +0000
+++ gcc/Makefile.in
@@ -2074,6 +2074,7 @@ prefix.o: prefix.c $(CONFIG_H) $(SYSTEM_
@@ -2090,6 +2090,7 @@ prefix.o: prefix.c $(CONFIG_H) $(SYSTEM_
# Language-independent files.

DRIVER_DEFINES = \
+ -DLINK_LIBGCC_SPEC="\"%D $(LINKER_RPATH_FLAG)$(prefix)/@GCC_TARGET_MACHINE@/lib/%M $(LINKER_RPATH_FLAG)$(libdir)/%M \"" \
-DSTANDARD_STARTFILE_PREFIX=\"$(unlibsubdir)/\" \
-DSTANDARD_EXEC_PREFIX=\"$(libdir)/gcc/\" \
-DSTANDARD_LIBEXEC_PREFIX=\"$(libexecdir)/gcc/\" \
@@ -4204,7 +4205,7 @@ stmp-fixinc: gsyslimits.h macro_list fix
gcc_dir=`${PWD_COMMAND}` ; \
export TARGET_MACHINE srcdir SHELL MACRO_LIST && \
cd $(build_objdir)/fixincludes && \
- $(SHELL) ./fixinc.sh "$${gcc_dir}/$${fix_dir}" \
+ $(SHELL) -c true "$${gcc_dir}/$${fix_dir}" \
$(SYSTEM_HEADER_DIR) $(OTHER_FIXINCLUDES_DIRS) ); \
rm -f $${fix_dir}/syslimits.h; \
if [ -f $${fix_dir}/limits.h ]; then \
15 changes: 15 additions & 0 deletions lang/gcc47/patches/patch-gcc_caller-save.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
$NetBSD$

Disable -fomit-frame-pointer.

--- gcc/caller-save.c.orig 2011-11-08 17:36:45.000000000 +0000
+++ gcc/caller-save.c
@@ -380,7 +380,7 @@ saved_hard_reg_compare_func (const void
const struct saved_hard_reg *p1 = *(struct saved_hard_reg * const *) v1p;
const struct saved_hard_reg *p2 = *(struct saved_hard_reg * const *) v2p;

- if (flag_omit_frame_pointer)
+ if (0)
{
if (p1->call_freq - p2->call_freq != 0)
return p1->call_freq - p2->call_freq;
19 changes: 19 additions & 0 deletions lang/gcc47/patches/patch-gcc_common.opt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
$NetBSD$

Implement -fstrict-calling-conventions, from:

https://github.com/richlowe/gcc/commit/c245a538375d071928782a1564cd7e55d70bd4a0

--- gcc/common.opt.orig 2013-01-14 16:32:37.000000000 +0000
+++ gcc/common.opt
@@ -1855,6 +1855,10 @@ fstrict-aliasing
Common Report Var(flag_strict_aliasing) Optimization
Assume strict aliasing rules apply

+fstrict-calling-conventions
+Common Report Var(flag_strict_calling_conventions) Init(1)
+Use strict ABI calling conventions even for static functions
+
fstrict-overflow
Common Report Var(flag_strict_overflow)
Treat signed overflow as undefined
50 changes: 50 additions & 0 deletions lang/gcc47/patches/patch-gcc_config_i386_i386.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
$NetBSD$

Disable -fomit-frame-pointer.
Add support for -fstrict-calling-conventions.

--- gcc/config/i386/i386.c.orig 2013-04-02 16:54:39.000000000 +0000
+++ gcc/config/i386/i386.c
@@ -3547,7 +3547,7 @@ ix86_option_override_internal (bool main
}

/* Keep nonleaf frame pointers. */
- if (flag_omit_frame_pointer)
+ if (0)
target_flags &= ~MASK_OMIT_LEAF_FRAME_POINTER;
else if (TARGET_OMIT_LEAF_FRAME_POINTER)
flag_omit_frame_pointer = 1;
@@ -3685,7 +3685,7 @@ ix86_option_override_internal (bool main
around edges. */
if ((flag_unwind_tables || flag_asynchronous_unwind_tables
|| flag_exceptions || flag_non_call_exceptions)
- && flag_omit_frame_pointer
+ && 0
&& !(target_flags & MASK_ACCUMULATE_OUTGOING_ARGS))
{
if (target_flags_explicit & MASK_ACCUMULATE_OUTGOING_ARGS)
@@ -5171,6 +5171,7 @@ ix86_function_regparm (const_tree type,
if (decl
&& TREE_CODE (decl) == FUNCTION_DECL
&& optimize
+ && (TARGET_64BIT || !flag_strict_calling_conventions)
&& !(profile_flag && !flag_fentry))
{
/* FIXME: remove this CONST_CAST when cgraph.[ch] is constified. */
@@ -5248,6 +5249,7 @@ ix86_function_sseregparm (const_tree typ
/* For local functions, pass up to SSE_REGPARM_MAX SFmode
(and DFmode for SSE2) arguments in SSE registers. */
if (decl && TARGET_SSE_MATH && optimize
+ && (TARGET_64BIT || !flag_strict_calling_conventions)
&& !(profile_flag && !flag_fentry))
{
/* FIXME: remove this CONST_CAST when cgraph.[ch] is constified. */
@@ -9973,7 +9975,7 @@ ix86_finalize_stack_realign_flags (void)
&& !crtl->need_drap
&& frame_pointer_needed
&& current_function_is_leaf
- && flag_omit_frame_pointer
+ && 0
&& current_function_sp_is_unchanging
&& !ix86_current_function_calls_tls_descriptor
&& !crtl->accesses_prior_frames
15 changes: 13 additions & 2 deletions lang/gcc47/patches/patch-gcc_configure
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,20 @@ Add dl_iterate_phdr detection for FreeBSD and DragonFly.
Detection for NetBSD and OpenBSD is added but commented out in case this
error handling mechanism is activated for these platforms later.

--- gcc/configure.orig 2012-03-08 13:54:54.000000000 +0000
Fix detection of native TLS on SunOS, joyent/pkgsrc#264

--- gcc/configure.orig 2014-02-12 16:43:47.000000000 +0000
+++ gcc/configure
@@ -26802,6 +26802,20 @@ case "$target" in
@@ -23374,7 +23374,7 @@ $as_echo "#define TLS_SECTION_ASM_FLAG '
.section ".tdata","awT",@progbits'
tls_first_major=2
tls_first_minor=14
- tls_as_opt="--fatal-warnings"
+ tls_as_opt="-32 --fatal-warnings"
fi
conftest_s="$conftest_s
foo: .long 25
@@ -26906,6 +26906,20 @@ case "$target" in
gcc_cv_target_dl_iterate_phdr=no
fi
;;
Expand Down
15 changes: 15 additions & 0 deletions lang/gcc47/patches/patch-gcc_dojump.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
$NetBSD$

Disable -fomit-frame-pointer.

--- gcc/dojump.c.orig 2012-02-09 14:46:02.000000000 +0000
+++ gcc/dojump.c
@@ -81,7 +81,7 @@ void
clear_pending_stack_adjust (void)
{
if (optimize > 0
- && (! flag_omit_frame_pointer || cfun->calls_alloca)
+ && (! 0 || cfun->calls_alloca)
&& EXIT_IGNORE_STACK)
discard_pending_stack_adjust ();
}
24 changes: 24 additions & 0 deletions lang/gcc47/patches/patch-gcc_ira.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
$NetBSD$

Disable -fomit-frame-pointer.

--- gcc/ira.c.orig 2012-02-21 23:27:59.000000000 +0000
+++ gcc/ira.c
@@ -1620,7 +1620,7 @@ ira_init (void)
{
free_register_move_costs ();
setup_reg_mode_hard_regset ();
- setup_alloc_regs (flag_omit_frame_pointer != 0);
+ setup_alloc_regs (0 != 0);
setup_class_subset_and_memory_move_costs ();
setup_reg_class_nregs ();
setup_prohibited_class_mode_regs ();
@@ -1785,7 +1785,7 @@ ira_setup_eliminable_regset (void)
case. At some point, we should improve this by emitting the
sp-adjusting insns for this case. */
int need_fp
- = (! flag_omit_frame_pointer
+ = (! 0
|| (cfun->calls_alloca && EXIT_IGNORE_STACK)
/* We need the frame pointer to catch stack overflow exceptions
if the stack pointer is moving. */
20 changes: 20 additions & 0 deletions lang/gcc48/ALTERNATIVES
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
bin/c++ @PREFIX@/gcc48/bin/c++
bin/cc @PREFIX@/gcc48/bin/cc
bin/cpp @PREFIX@/gcc48/bin/cpp
bin/g++ @PREFIX@/gcc48/bin/g++
bin/gcc @PREFIX@/gcc48/bin/gcc
bin/gcc-ar @PREFIX@/gcc48/bin/gcc-ar
bin/gcc-nm @PREFIX@/gcc48/bin/gcc-nm
bin/gcc-ranlib @PREFIX@/gcc48/bin/gcc-ranlib
bin/gccgo @PREFIX@/gcc48/bin/gccgo
bin/gcov @PREFIX@/gcc48/bin/gcov
bin/gfortran @PREFIX@/gcc48/bin/gfortran
bin/@MACHINE_GNU_PLATFORM@-c++ @PREFIX@/gcc48/bin/@MACHINE_GNU_PLATFORM@-c++
bin/@MACHINE_GNU_PLATFORM@-g++ @PREFIX@/gcc48/bin/@MACHINE_GNU_PLATFORM@-g++
bin/@MACHINE_GNU_PLATFORM@-gcc @PREFIX@/gcc48/bin/@MACHINE_GNU_PLATFORM@-gcc
bin/@MACHINE_GNU_PLATFORM@-gcc-@GCC48_DIST_VERSION@ @PREFIX@/gcc48/bin/@MACHINE_GNU_PLATFORM@-gcc-@GCC48_DIST_VERSION@
bin/@MACHINE_GNU_PLATFORM@-gcc-ar @PREFIX@/gcc48/bin/@MACHINE_GNU_PLATFORM@-gcc-ar
bin/@MACHINE_GNU_PLATFORM@-gcc-nm @PREFIX@/gcc48/bin/@MACHINE_GNU_PLATFORM@-gcc-nm
bin/@MACHINE_GNU_PLATFORM@-gcc-ranlib @PREFIX@/gcc48/bin/@MACHINE_GNU_PLATFORM@-gcc-ranlib
bin/@MACHINE_GNU_PLATFORM@-gccgo @PREFIX@/gcc48/bin/@MACHINE_GNU_PLATFORM@-gccgo
bin/@MACHINE_GNU_PLATFORM@-gfortran @PREFIX@/gcc48/bin/@MACHINE_GNU_PLATFORM@-gfortran
17 changes: 15 additions & 2 deletions lang/gcc49-libs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ CHECK_SHLIBS= no
## Depend on exactly ${GCC49_DIST_VERSION}.
BUILD_DEPENDS+= ${GCC_PKGNAME}-${GCC49_DIST_VERSION}{,nb[0-9]*}:../../lang/gcc49

# Finds libs from gcc49 due to rpath
CHECK_SHLIBS= no

.include "../../mk/bsd.prefs.mk"

LIBGCC_SUBPREFIX= ${GCC_PKGNAME}
Expand All @@ -43,9 +46,11 @@ SHLIB_EXT= so
.endif

LIBRARY_FILES= ${WRKDIR}/lib_files
OBJECT_FILES= ${WRKDIR}/obj_files

GENERATE_PLIST+= ${SED} -e 's,^,${LIBGCC_SUBPREFIX}/${GCC_TARGET_MACHINE}/,' \
${LIBRARY_FILES};
-e 's,gcc/${MACHINE_GNU_PLATFORM}/${GCC49_DIST_VERSION}/,,' \
${LIBRARY_FILES} ${OBJECT_FILES};
GENERATE_PLIST+= ${GREP} -q 'lib/' ${LIBRARY_FILES} || \
${ECHO} '@pkgdir ${LIBGCC_SUBPREFIX}/${GCC_TARGET_MACHINE}/lib' ;

Expand All @@ -55,11 +60,19 @@ ${LIBRARY_FILES}:
-e'/libgij/d;/libgcj/d;/libjvm/d' \
-e'/lib.*\.${SHLIB_EXT}/p' >${LIBRARY_FILES}

do-install: ${LIBRARY_FILES}
${OBJECT_FILES}:
${PKG_INFO} -qL '${GCC_PKGNAME}-${GCC49_DIST_VERSION}*' | \
${SED} -n -e 's,^${LIBGCC_PREFIX}/,,' \
-e '/\.o/p' -e '/libgcc\.a/p' -e '/libssp_nonshared\.a/p' >${OBJECT_FILES}

do-install: ${LIBRARY_FILES} ${OBJECT_FILES}
${TEST} -d ${DESTDIR}${LIBGCC_PREFIX}/${GCC_TARGET_MACHINE}/lib || \
${MKDIR} ${DESTDIR}${LIBGCC_PREFIX}/${GCC_TARGET_MACHINE}/lib
cd ${LIBGCC_PREFIX} && \
${PAX} -rw ${DESTDIR}${LIBGCC_PREFIX}/${GCC_TARGET_MACHINE} <${LIBRARY_FILES}
cd ${LIBGCC_PREFIX} && \
${PAX} -r -s ',gcc/${MACHINE_GNU_PLATFORM}/${GCC49_DIST_VERSION}/,,' \
-w ${DESTDIR}${LIBGCC_PREFIX}/${GCC_TARGET_MACHINE} <${OBJECT_FILES}

.include "../../mk/dlopen.buildlink3.mk"
.include "../../mk/pthread.buildlink3.mk"
Expand Down
20 changes: 20 additions & 0 deletions lang/gcc49/ALTERNATIVES
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
bin/c++ @PREFIX@/gcc49/bin/c++
bin/cc @PREFIX@/gcc49/bin/cc
bin/cpp @PREFIX@/gcc49/bin/cpp
bin/g++ @PREFIX@/gcc49/bin/g++
bin/gcc @PREFIX@/gcc49/bin/gcc
bin/gcc-ar @PREFIX@/gcc49/bin/gcc-ar
bin/gcc-nm @PREFIX@/gcc49/bin/gcc-nm
bin/gcc-ranlib @PREFIX@/gcc49/bin/gcc-ranlib
bin/gccgo @PREFIX@/gcc49/bin/gccgo
bin/gcov @PREFIX@/gcc49/bin/gcov
bin/gfortran @PREFIX@/gcc49/bin/gfortran
bin/@MACHINE_GNU_PLATFORM@-c++ @PREFIX@/gcc49/bin/@MACHINE_GNU_PLATFORM@-c++
bin/@MACHINE_GNU_PLATFORM@-g++ @PREFIX@/gcc49/bin/@MACHINE_GNU_PLATFORM@-g++
bin/@MACHINE_GNU_PLATFORM@-gcc @PREFIX@/gcc49/bin/@MACHINE_GNU_PLATFORM@-gcc
bin/@MACHINE_GNU_PLATFORM@-gcc-@GCC49_DIST_VERSION@ @PREFIX@/gcc49/bin/@MACHINE_GNU_PLATFORM@-gcc-@GCC49_DIST_VERSION@
bin/@MACHINE_GNU_PLATFORM@-gcc-ar @PREFIX@/gcc49/bin/@MACHINE_GNU_PLATFORM@-gcc-ar
bin/@MACHINE_GNU_PLATFORM@-gcc-nm @PREFIX@/gcc49/bin/@MACHINE_GNU_PLATFORM@-gcc-nm
bin/@MACHINE_GNU_PLATFORM@-gcc-ranlib @PREFIX@/gcc49/bin/@MACHINE_GNU_PLATFORM@-gcc-ranlib
bin/@MACHINE_GNU_PLATFORM@-gccgo @PREFIX@/gcc49/bin/@MACHINE_GNU_PLATFORM@-gccgo
bin/@MACHINE_GNU_PLATFORM@-gfortran @PREFIX@/gcc49/bin/@MACHINE_GNU_PLATFORM@-gfortran
Loading

0 comments on commit d1c9624

Please sign in to comment.