pkgsrc/lang/gcc49/Makefile
jperkin 0bda74dc3f Update lang/gcc49 to 4.9.4. Changes since 4.9.3:
* libsanitizer merge from upstream r191666 breaks bootstrap on powerpc64-linux and aarch64-linux
 * [6 regression] sparc bootstrap failure: sparc.c:4919:6: error: suggest explicit braces to avoid ambiguous 'else'
 * [4.9/5/6 Regression] Miscompilation of glibc on i686-linux starting with r234101
 * [4.9/5/6 regression] Performance regression of 410.bwaves on x86.
 * [4.9/5/6 Regression] gcc.dg/torture/pr44913.c FAILs with -O3 -fno-dce -fno-forward-propagate
 * [4.9/5/6 Regression] Inline memcmp is *much* slower than glibc's
 * [4.9/5/6 Regression] ICE: Maximum number of LRA constraint passes is achieved (30)
 * [4.9/5/6 Regression] Another label as values ICE in gen_reg_rtx
 * [4.9 Regression] ICE on valid code on x86_64-linux-gnu: verify_gimple failed
 * [4.9 Regression] i386: -fshrink-wrap can interact badly with trampolines
 * [4.9 Regression] wrong code at -O1 and above on x86_64-linux-gnu
 * [4.9 Regression] gcc.c-torture/execute/pr68376-2.c FAILs with -ftracer
 * [4.9 Regression] ICE (segfault) at -Os on x86_64-linux-gnu in ""fail_abnormal_edge_coalesce""
 * [4.9 Regression] ICE in connect_traces
 * [4.9 Regression] ICE on invalid code on x86_64-linux-gnu in operator[]
 * [4.9 Regression] gcc ICE at -O1 and above  on valid code on x86_64-linux-gnu with “seg fault”
 * [4.9 Regression] gcc ICE at -O3 and above on valid code on x86_64-linux-gnu in ""replace_uses_by""
 * [4.9/5/6 regression] fipa-cp-clone ignores thunk
 * [4.9/5/6 Regression] Corrupt truncated function
 * [4.9 Regression] Issue with using declaration and member class template
 * [4.9/5/6 Regression] failure to determine size of static constexpr array that is nested within a templated class
 * [4.9/5/6 Regression] expression of typeid( expression ) is evaluated twice
 * [4.9/5/6 Regression] decltype and sfinae to check for template instance availability fails to compile
 * [5/6/7 regression] ICE with polymorphic lambda
 * [5/6/7 Regression] Missing copy elision with operator new
 * [4.9 Regression]ICE: unrecognizable insn compiling arm-fp16 testcases with -march=armv7-a and -mrestrict-it
 * [4.9/5/6 Regression] ICE: in recog_memoized
 * [4.9 Regression][ARM] ICE: fail to generate BIC(immediate) instruction
 * [4.9/5/6 Regression] Bad ARM code generated for evaluating unsigned int bitfield value
 * [4.9 Regression] Extremely long compile time for generated code
 * [4.9 regression] m68k misoptimisation with -fschedule-insns
 * [4.9/5/6 Regression] ICE in -flto -fmerge-all-constants -fno-use-linker-plugin targetting i686-w64-mingw32
 * [4.9 Regression] ICE when comparing vectors
 * [4.9/5/6 Regression] -Wparentheses missing ambiguous else warning
 * [4.9/5/6 Regression] ICE on invalid C++ code on x86_64-linux-gnu: Segmentation fault
 * [4.9/5/6 Regression] ICE: in merge_exception_specifiers
 * [4.9/5/6 regression] GCC emits incorrect fixed->fp conversion instruction on Cortex-M4 target
 * [4.9/5 Regression] extern ""C"" functions in src/c++11/thread.cc are global in libstdc++.a
 * [4.9 Regression] DOM confuses complete unrolling which in turn causes VRP to warn
 * [4.9 Regression] wrong code at -O2 and -O3 on x86_64-linux-gnu
 * [4.9 Regression] ICE at -Os and above with -g enabled on x86_64-linux-gnu
 * [4.9 Regression] ICE at -O2 and -O3 on x86_64-linux-gnu
 * [4.9 Regression] gcc ICE at -O2 and -O3 on x86_64-linux-gnu in hide_evolution_in_other_loops_than_loop
 * [4.9 regression] ICE: in store_bit_field_1
 * [4.9 Regression] Wrong optimization with aliasing and access via char
 * [5/6 Regression] ICE on valid code at -O2 and -O3 with -g enabled in simplify_subreg
 * [4.9/5/6 Regression] Geode optimizations incorrectly return -NaN
 * [5 Regression] wrong code with -O2 and vector arithmetics @ x86_64
 * [4.9/5 Regression] uncaught_exception() equals to `true' after rethrow_exception()
 * [4.9/5 Regression] Mistakenly unsupported tests in g++.dg/torture/
 * [4.9/5/6 regression] incorrect memcpy expansion with unrolled_loop strategy at -O2
 * [4.9/5 Regression] Segmentation fault on a template class
 * [4.9/5 Regression] compile error when including valarray
 * [4.9/5/6 Regression] deduction failure with trailing return type in function template argument
 * ICE on -O2 and above on x86_64-linux-gnu (internal compiler error: in get_expr_operands
 * powerpc64 bootstrap with -mcmodel=small results in linker error
 * libatomic fails to build with -Os on powerpc64-linux
 * ICE: in emit_move_insn
 * [4.9/5 Regression] gcc hangs on valid code on x86_64-linux-gnu
 * configure incorrectly strips $target_alias from PLUGIN_LD_SUFFIX
 * [x86] 'asm' operand has impossible constraints with -fstack-check
 * broken support for attribute init_priority
 * [4.9/5/6 Regression] wrong code with -mbmi2
 * Missing ""not"" breaks Ada.Text_IO.Get_Immediate(File
 * [4.9 Regression] Crash in preprocessor including stdc-predef.h when it does not exist on glibc-based systems
 * [4.9 Regression] libgomp.c/appendix-a/a.29.1.c -O2 -g: type mismatch between an SSA_NAME and its symbol
 * [4.9 Regression] all pch tests fail on eglibc systems (with bits/predefs.h)
 * [4.9 regression] On-stack VLA does not cause instrumentation with -fstack-protector
 * [4.9 Regression] OpenMP workshare problem with SUM()
 * [4.9/5/6 Regression] Wrong code with single element vector insert
 * wrong code with -mstringop-strategy=libcall @ i686
 * [4.9 Regression] ICE at -O1 and above on x86_64-linux-gnu in gen_lsm_tmp_name
 * Wrong code with -O1.
 * [4.9 Regression] ICE on valid code at -O2 and -O3 on x86_64-linux-gnu: in execute_todo
 * [4.9/5 Regression] ICE: verify_gimple failed (type mismatch in shift expression
 * [4.9 Regression] ICE in lower_omp_target
 * [4.9/5/6/7 Regression] g++ accepts an unreachable function catch block that lacks a corresponding try
 * [4.9/5/6 Regression] incorrect ""is protected within this context"" error
 * Incorrect code generated for tail call
 * [4.9/5/6 Regression][arm] Wrong code for FP mult-by-power-of-2 + int conversion
 * [4.9/5/6 Regression] wrong code at -O2 and -O3 on x86_64-linux-gnu
 * [4.9/5/6 Regression] Wrong thumb2_ior_scc_strict_it insn pattern.
 * [4.9/5 Regression] Wrong barrier placement for 64-bit atomic loads on arm
 * ARM -mcpu=native can cause a double free abort.
 * [AArch64] aarch64_vmls pattern should be rejected if -ffp-contract=off
 * ICE: tree check: expected integer_cst
 * false positive signed negation
 * Crash with abi_tag attribute
 * [4.9/5 Regression] ICE in gimple_call_arg with bogus posix_memalign
 * [4.9/5/6 Regression] ICE on  __builtin_alloca_with_align with small alignment
 * vnmul
 * [5 Regression] ICE for array of a derived type with allocatable class in derived type object
 * [4.9/5/6 Regression] ""error: too few arguments to function"" in c++14 but not c++11
 * error with multiple enable_shared_from_this base classes
 * --fast-math breaks std::signbit function
 * std::random_device Ignores Read Return Code (CVE-2015-5276)
 * Wrong value category used in _Bind functor
 * [4.9/5/6 Regression] Including both <tr1/functional> and <functional> can cause ADL problems in std::function SFINAE
 * [4.9/5 Regression] std::copy/std::move broken with trivial move-only types
 * -ftree-loop-if-convert-stores miscompiles gfortran.dg/elemental_optional_args_3.f90
 * ifcombine joins together floating point expression with side effects
 * [4.9 Regression] gcc ICE at -O3 and __sigsetjmp with “tree check: expected ssa_name
 * [4.9 Regression] ICE: in tree_to_shwi
 * [4.9/5 Regression] Wrong optimization of stores to _Bool via char*
 * [4.9
 * FAIL: gcc.dg/debug/dwarf2/discriminator.c scan-assembler on x86_64-apple-darwin10
 * gcc doesn't conform to Solaris 32-bit ABI by expecting 16-byte stack alignment
 * [4.9/5/6/7 Regression] Incorrect PPC assembly due to inserted .machine pseudo-op
 * libgfortran: warning: left shift of negative value [-Wshift-negative-value]
 * [4.9/5/6] gcc.target/i386/readeflags-1.c aborts on -march=i586 or on -miamcu
 * ICE: gcc.target/i386/avx512f-klogic-2.c
 * [4.9/5 Regression] incorrect load address on manual vector shuffle
 * [PATCH] gcc 4.8.4 fails to compile with -march=native on VIA nano CPU
 * ICE at -O1 and above on x86_64-linux-gnu in int_mode_for_mode
 * [4.9/5/6 Regression] ""gcc -m32 -finstrument-functions -ffixed-ebp"" produces internal compiler error
 * ICE: in extract_insn
 * Alpha: Error: No lda !gpdisp!278 was found
 * [7 Regression] Lots of ASAN and libgo runtime FAILs after r236090
 * [7 Regression] ICE on trunk gcc on ivybridge target (df_refs_verify)
 * __tls_get_addr is called with misaligned stack on x86-64
 * [4.9/5 Regression] Compiling glibc-2.17
 * Crash when selecting specializations through aliases.
 * gcc 4.9.0 fails to execute dsymutil when linking executables on darwin
 * [4.9 Regression] bootstrap with -O3 gives comparison failure
 * [4.9/5/6 regression] Memory leak with assignment to array of derived types with allocatable components
 * [4.9/5 Regression] ICE (segmentation fault) on sh4-linux-gnu
 * [4.9 Regression] Compiling with -fstack-protector-strong causes binary to segfault
 * wrong code for bit-field struct at -O1 and above on x86_64-linux-gnu
 * ""^[a-z0-9][a-z0-9-]*$"
 * s-osinte-rtems.ads is out of synch with type definitions of current newlib
 * Regular expressions: Backreferences don't work in negative lookahead
 * [4.9/5/6 Regression] basic_string constructor and throwing iterators
 * [4.9 only] test case gcc.dg/and-1.c fails on power for gcc 4.9
 * [4.9 Regression] Several hundred asan failures with 4.9.4 on x86_64-apple-darwin15
 * [4.9/5/6/7 regression] S/390: Memory access below stack pointer in epilogue
 * [4.9 regression] ICE at -O1 and above on x86_64-linux-gnu (in output_constant_pool_2
 * ALLOCATE with size given by a module function
 * [meta-bug] Port tail-merge fixes to 4.9
 * [4.9/5/6 Regression] No backtrace generated for array bounds violation
 * [4.9/5/6 Regression] Internal compiler error for Fortran files when specifying a file instead of an include directory with -I
 * [4.9/5/6/7 Regression] ICE on missing end program in fixed source
 * [4.9/5/6/7 Regression] incorrect reading of values from file on Windows
 * [4.9/5/6/7 Regression] ICE in gfc_trans_structure_assign
 * [4.9/5/6 Regression] FAIL: gfortran.dg/class_allocate_18.f90
 * [4.9/5 Regression] Wrong code with allocatable deferred-length (array) function results
 * [4.9 Regression] ICE on invalid: ""Bad array reference"" for an undeclared loop variable
 * [4.9/5 Regression] ICE on allocating character array with source
 * [4.9/5 Regression] Wrong length when allocating character array
 * [4.9/5 Regression] ICE on function result with procedure pointer component
 * [4.9 Regression] ICE with -g in native_encode_initializer
 * [4.9/5/6 Regression] Errors in ""make -k check-gcc RUNTESTFLAGS=plugin.exp""
 * [4.9/5/6 regression] Bootstrapping on x86_64-pc-kfreebsd-gnu fails with ""s-taprop.adb:717:32: ""lwp_self"" is undefined""
 * [4.9/5/6 regression] Bootstrapping on x86_64-pc-kfreebsd-gnu fails with ""s-taprop.adb:856:10: ""pthread_attr_setaffinity_np"" is undefined (more references follow)""
 * [4.9/5/6 regression] ICE in gcc/java/lang.c:427 with -fdump-tree-all
 * [4.9/5/6 Regression] ICE: in create_linear_expr_from_tree
 * [4.9/5/6 Regression] -ftree-loop-linear: large compile time / memory usage
 * [4.9/5/6 Regression] ICE in gen_reg_rtx
 * [4.9/5/6 Regression] libada bootstrap failure on kfreebsd (""pthread_rwlock_t"" not declared in ""OS_Interface"")
 * [4.9/5/6 Regression] libbacktrace causes undefined symbol ""_Unwind_GetIPInfo"" on ia64-hpux
 * [4.9/5/6 Regression] endless loop with -O2 -floop-parallelize-all
 * [4.9 Regression] [graphite] Segmentation fault with -Ofast -floop-parallelize-all -ftree-parallelize-loops
 * [4.9/5/6 Regression] Build of i686-pc-linux-android is broken
 * [4.9 Regression] Free-form source code: -Wline-truncation is no longer enabled by default
 * [4.9 Regression] ICE: FORALL writing multiple elements of one array
 * [4.9/5/6 Regression] ICE on invalid code on x86_64-linux-gnu in tree check: expected function_type or method_type
 * [4.9/5/6 Regression] gcc 4.9+ miscompiles code on hppa
 * [4.9/5/6/7 Regression] ICE in analyze
 * [4.9 /5/6 Regression] ICE in get_narrower
 * [4.9/5/6 Regression] Build failure: undefined symbol __floatunsitf
 * [4.9/5/6 Regression] ICE when renaming predefined ""="" and ""/=""
 * [4.9/5/6 Regression] ICE: in compute_affine_dependence
2016-09-06 12:37:47 +00:00

197 lines
6.6 KiB
Makefile

# $NetBSD: Makefile,v 1.13 2016/09/06 12:37:47 jperkin Exp $
GCC_PKGNAME= gcc49
.include "version.mk"
DISTNAME= gcc-${GCC49_DIST_VERSION}
PKGNAME= ${GCC_PKGNAME}-${GCC49_DIST_VERSION}
## When bumping the PKGREVISION of this package the PKGREVISION of
## lang/gcc49-libs needs to be bump to be at least 1 more than the
## PKGREVISION of this package!
#PKGREVISION=
CATEGORIES= lang
MASTER_SITES= ${MASTER_SITE_GNU:=gcc/gcc-${GCC49_DIST_VERSION}/}
EXTRACT_SUFX= .tar.bz2
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://gcc.gnu.org/
COMMENT= The GNU Compiler Collection (GCC) - 4.9 Release Series
LICENSE= gnu-gpl-v2 AND gnu-gpl-v3 AND gnu-lgpl-v2 AND gnu-lgpl-v3
DISTFILES= ${DEFAULT_DISTFILES}
EXTRACT_ONLY= ${DEFAULT_DISTFILES}
NOT_FOR_PLATFORM= Interix-*-*
USE_LANGUAGES= c c++
USE_TOOLS+= gmake makeinfo sed:run
GNU_CONFIGURE= yes
## Build outside ${WRKSRC}
OBJDIR= ../build
CONFIGURE_DIRS= ${OBJDIR}
CONFIGURE_SCRIPT= ../${DISTNAME}/configure
GCC_SUBPREFIX= ${GCC_PKGNAME}
GCC_PREFIX= ${PREFIX}/${GCC_SUBPREFIX}
GCC_TARGET_MACHINE?= ${MACHINE_GNU_PLATFORM}
GNU_CONFIGURE_PREFIX= ${GCC_PREFIX}
INFO_FILES= yes
UNLIMIT_RESOURCES+= datasize
UNLIMIT_RESOURCES+= stacksize
SUBST_CLASSES+= vars
SUBST_STAGE.vars= pre-configure
SUBST_FILES.vars= gcc/Makefile.in
SUBST_VARS.vars= GCC_TARGET_MACHINE
.include "../../mk/bsd.prefs.mk"
LANGS= c
# In some cases LINKER_RPATH_FLAG needs a trailing space.
LINKER_RPATH_FLAG:= ${LINKER_RPATH_FLAG:S/-rpath/& /}
## The Library rpath to use in end programs.
LDFLAGS_FOR_TARGET= ${LDFLAGS:M${COMPILER_RPATH_FLAG}*:N*/usr/lib*}
# The "-static-libstdc++ -static-libgcc" flags are normally added to the
# boot-ldflags by configure but because we are supply the boot-ldflags
# we mash supply them.
BOOT_LDFLAGS= -static-libstdc++ -static-libgcc ${LDFLAGS_FOR_TARGET}
# Needed on Darwin when LDFLAGS point to a SDK
BOOT_LDFLAGS+= ${LDFLAGS:M-Wl,-syslibroot*}
# Ignore missing rpaths in "fake" library.
CHECK_SHLIBS_SKIP+= ${GCC_PKGNAME}/lib*/libgcj_bc.so*
## For target librarys and libjava programs.
CONFIGURE_ENV+= LDFLAGS_FOR_TARGET=${LDFLAGS_FOR_TARGET:Q}
.if !empty(MACHINE_PLATFORM:MNetBSD-*-*) # use the native SSP code in netbsd libc, gcc libssp conflicts with it.
CONFIGURE_ARGS+= --disable-libssp
.else
CONFIGURE_ARGS+= --enable-libssp
.endif
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+= --enable-threads=posix
CONFIGURE_ARGS+= --with-boot-ldflags=${BOOT_LDFLAGS:Q}
CONFIGURE_ARGS.NetBSD+= --with-gnu-ld --with-ld=/usr/bin/ld
CONFIGURE_ARGS.NetBSD+= --with-gnu-as --with-as=/usr/bin/as
MAKE_ENV.NetBSD+= ac_cv_func_clock_gettime=yes
MAKE_ENV.NetBSD+= ac_cv_func_gethostbyname_r=no
CONFIGURE_ARGS.DragonFly+= --disable-bootstrap
# See ${WRKSRC}/libgcc/config/t-slibgcc-darwin: It uses strip(1) to
# create a stub library, not just to remove symbols, so we must not
# let strip(1) be a no-op regardless of ${INSTALL_UNSTRIPPED} or the
# build fails for missing files.
CONFIGURE_ARGS.Darwin+= STRIP_FOR_TARGET=${TOOLS_PLATFORM.strip}
.if !empty(MACHINE_PLATFORM:MDarwin-[0-8].*-*)
CONFIGURE_ARGS+= --with-dwarf2
CONFIGURE_ARGS+= --disable-libitm
.endif
.if !empty(MACHINE_PLATFORM:MDarwin-[0-8].*-powerpc)
CONFIGURE_ARGS+= --disable-multilib
.endif
.if !empty(MACHINE_PLATFORM:MNetBSD-*-i386) || !empty(MACHINE_PLATFORM:MLinux-*-i386)
CONFIGURE_ARGS+= --with-arch=i486 --with-tune=i486
.endif
# Disable fixincludes on SmartOS, header changes result in broken includes
# being generated, see https://github.com/joyent/pkgsrc/issues/270
.if ${OS_VARIANT} == "SmartOS"
SUBST_CLASSES+= fixinc
SUBST_STAGE.fixinc= pre-configure
SUBST_FILES.fixinc= gcc/Makefile.in
SUBST_SED.fixinc= -e "s,\./fixinc.sh,-c true,"
.endif
.include "options.mk"
# ${WRKSRC}/fixincludes/ looks for sed and compiles the path to sed into
# a binary so we need to make sure we give it the installed sed and not
# the tool wrapped one.
MAKE_ENV+= ac_cv_path_SED=${TOOLS_SED}
MAKE_ENV+= lt_cv_path_SED=${TOOLS_SED}
.if !empty(MACHINE_PLATFORM:MSunOS-5.1[123456789]-*)
# Causes multilib build problems with specific compiler combinations
MAKE_ENV+= gcc_cv_ld_as_needed=no
# Determine whether to use binutils
. if exists(/usr/sfw/bin/gobjdump)
CONFIGURE_ENV+= OBJDUMP=/usr/sfw/bin/gobjdump
. endif
. if exists(/usr/bin/ld)
CONFIGURE_ARGS+= --without-gnu-ld --with-ld=/usr/bin/ld
. else
CONFIGURE_ARGS+= --without-gnu-ld --with-ld=/usr/ccs/bin/ld
. endif
. if exists(/usr/sfw/bin/gas)
CONFIGURE_ARGS+= --with-gnu-as --with-as=/usr/sfw/bin/gas
. elif exists(/usr/ccs/bin/as)
CONFIGURE_ARGS+= --without-gnu-as --with-as=/usr/ccs/bin/as
. else
BUILDLINK_DEPMETHOD.binutils= full
. include "../../devel/binutils/buildlink3.mk"
CONFIGURE_ARGS+= --with-gnu-as --with-as=${PREFIX}/bin/gas
. endif
.elif !empty(MACHINE_PLATFORM:MSunOS-5.10-*)
. if exists(/usr/sfw/bin/gobjdump)
CONFIGURE_ENV+= OBJDUMP=/usr/sfw/bin/gobjdump
. endif
BUILDLINK_API_DEPENDS.binutils+= binutils>=2.23
BUILDLINK_DEPMETHOD.binutils= full
. include "../../devel/binutils/buildlink3.mk"
CONFIGURE_ENV+= OBJCOPY=${PREFIX}/bin/gobjcopy
CONFIGURE_ARGS+= --with-gnu-as --with-as=${PREFIX}/bin/gas
CONFIGURE_ARGS+= --without-gnu-ld --with-ld=/usr/ccs/bin/ld
.endif
pre-configure:
${RUN} cd ${WRKSRC} && ${MKDIR} ${OBJDIR}
TEST_TARGET= -k check || ${TRUE}
pre-test:
${RUN} \
if runtest --version >/dev/null 2>/dev/null ; then \
: ; \
else \
${ECHO} "ERROR: Please install devel/dejagnu in order to run the test suite." ; \
exit 1 ; \
fi
post-test:
${RUN} cd ${WRKSRC} && cd ${OBJDIR} && \
${SHELL} ${WRKSRC}/contrib/test_summary >${WRKDIR}/test_summary.log
@${INFO_MSG} "Test summary are available in ${WRKDIR}/test_summary.log"
post-install:
${TEST} -f ${DESTDIR}${GCC_PREFIX}/bin/cc || \
( cd ${DESTDIR}${GCC_PREFIX}/bin ; ${LN} -f gcc cc )
.if !empty(PKG_OPTIONS:Mgcc-java)
${RM} -f ${DESTDIR}${JAVA_HOME}/bin/javadoc
${RM} -f ${DESTDIR}${JAVA_HOME}/jre/lib/${JAVA_ARCH}/libjawt.so
.endif
.if !empty(MACHINE_PLATFORM:MSunOS-*-*86*) && ${OS_VERSION} != "5.11"
${SH} files/values.c ${DESTDIR}${GCC_PREFIX}/bin/gcc -m32 || ${TRUE}
${SH} files/values.c ${DESTDIR}${GCC_PREFIX}/bin/gcc -m64 || ${TRUE}
.endif
GENERATE_PLIST+= \
cd ${DESTDIR}${PREFIX} && \
${FIND} ${GCC_SUBPREFIX} \( -type f -o -type l \) -print | ${SORT} ;
.include "../../mk/dlopen.buildlink3.mk"
.include "../../mk/pthread.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"