| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | # $NetBSD: hacks.mk,v 1.12 2014/05/29 07:57:07 adam Exp $ | | 1 | # $NetBSD: hacks.mk,v 1.13 2014/06/04 09:19:56 obache Exp $ |
2 | | | 2 | |
3 | .if !defined(PERL5_HACKS_MK) | | 3 | .if !defined(PERL5_HACKS_MK) |
4 | PERL5_HACKS_MK= defined | | 4 | PERL5_HACKS_MK= defined |
5 | | | 5 | |
6 | .include "../../mk/compiler.mk" | | 6 | .include "../../mk/compiler.mk" |
7 | | | 7 | |
8 | ### [Thu Jun 7 04:25:34 UTC 2001 : jlam] | | 8 | ### [Thu Jun 7 04:25:34 UTC 2001 : jlam] |
9 | ### Fix brokenness when using an older toolchain (gcc<3.3) on | | 9 | ### Fix brokenness when using an older toolchain (gcc<3.3) on |
10 | ### NetBSD/sparc64. Pass -g and -DDEBUGGING to the compiler to | | 10 | ### NetBSD/sparc64. Pass -g and -DDEBUGGING to the compiler to |
11 | ### circumvent some code-generation bugs. | | 11 | ### circumvent some code-generation bugs. |
12 | ### | | 12 | ### |
13 | .if !empty(MACHINE_PLATFORM:MNetBSD-*-sparc64) | | 13 | .if !empty(MACHINE_PLATFORM:MNetBSD-*-sparc64) |
14 | . if !empty(CC_VERSION:Mgcc*) | | 14 | . if !empty(CC_VERSION:Mgcc*) |
| @@ -54,34 +54,25 @@ CFLAGS+= -fno-cse-skip-blocks | | | @@ -54,34 +54,25 @@ CFLAGS+= -fno-cse-skip-blocks |
54 | ### do that for fpu branch insns, resulting in an out-of-range FPU | | 54 | ### do that for fpu branch insns, resulting in an out-of-range FPU |
55 | ### assembler branch instruction error in "ext/re/re_exec.c". | | 55 | ### assembler branch instruction error in "ext/re/re_exec.c". |
56 | ### | | 56 | ### |
57 | ### As a workaround, building with "-Os" instead of "-O2" reduces | | 57 | ### As a workaround, building with "-Os" instead of "-O2" reduces |
58 | ### the size of the object file enough to allow short branches. | | 58 | ### the size of the object file enough to allow short branches. |
59 | ### | | 59 | ### |
60 | ### See PR toolchain/45439. | | 60 | ### See PR toolchain/45439. |
61 | | | 61 | |
62 | .if ${OPSYS} == "NetBSD" && ${MACHINE_ARCH} == "m68k" | | 62 | .if ${OPSYS} == "NetBSD" && ${MACHINE_ARCH} == "m68k" |
63 | PKG_HACKS+= m68k-codegen | | 63 | PKG_HACKS+= m68k-codegen |
64 | BUILDLINK_TRANSFORM+= rename:-O[0-9]*:-Os | | 64 | BUILDLINK_TRANSFORM+= rename:-O[0-9]*:-Os |
65 | .endif | | 65 | .endif |
66 | | | 66 | |
67 | ### [Thr Mar 21 22:20:00 JST 2013 : obache] | | | |
68 | ### from KNOWN PROBLEMS in README.haiku | | | |
69 | ### Perl cannot be compiled with threading support ATM. | | | |
70 | ### | | | |
71 | .if !empty(MACHINE_PLATFORM:MHaiku-*-*) | | | |
72 | PKG_HACKS+= broken-haiku-pthreads | | | |
73 | PERL5_BUILD_THREADS_SUPPORT= no | | | |
74 | .endif | | | |
75 | | | | |
76 | ### [Fri Jan 31 11:09:04 CST 2014 : schnoebe] | | 67 | ### [Fri Jan 31 11:09:04 CST 2014 : schnoebe] |
77 | ### gcc-4.*.* in NetBSD/alpha causes unaligned access exception in perl. | | 68 | ### gcc-4.*.* in NetBSD/alpha causes unaligned access exception in perl. |
78 | ### -O works around, and there is a report that -O2 -fno-tree-ter is enough. | | 69 | ### -O works around, and there is a report that -O2 -fno-tree-ter is enough. |
79 | .if (!empty(MACHINE_PLATFORM:MNetBSD-*-alpha) || !empty(MACHINE_PLATFORM:MOpenBSD-*-alpha)) \ | | 70 | .if (!empty(MACHINE_PLATFORM:MNetBSD-*-alpha) || !empty(MACHINE_PLATFORM:MOpenBSD-*-alpha)) \ |
80 | && !empty(CC_VERSION:Mgcc-4.*.*) | | 71 | && !empty(CC_VERSION:Mgcc-4.*.*) |
81 | # XXX: is there any good way to replace the default -O2 with multiple args? | | 72 | # XXX: is there any good way to replace the default -O2 with multiple args? |
82 | PKG_HACKS+= alpha-optimisation | | 73 | PKG_HACKS+= alpha-optimisation |
83 | #BUILDLINK_TRANSFORM+= rename:-O[2-9]*:-O2 -fno-tree-ter | | 74 | #BUILDLINK_TRANSFORM+= rename:-O[2-9]*:-O2 -fno-tree-ter |
84 | CFLAGS+=-fno-tree-ter | | 75 | CFLAGS+=-fno-tree-ter |
85 | .endif | | 76 | .endif |
86 | | | 77 | |
87 | .endif # PERL5_HACKS_MK | | 78 | .endif # PERL5_HACKS_MK |