| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | # $NetBSD: hacks.mk,v 1.5 2008/04/24 07:40:24 bjs Exp $ | | 1 | # $NetBSD: hacks.mk,v 1.6 2008/04/25 20:11:11 bjs Exp $ |
2 | | | 2 | |
3 | .if !defined(MESALIBS_HACKS_MK) | | 3 | .if !defined(MESALIBS_HACKS_MK) |
4 | MESALIBS_HACKS_MK= # defined | | 4 | MESALIBS_HACKS_MK= # defined |
5 | | | 5 | |
6 | ### [Fri Dec 30 21:00:59 CET 2005 : schwarz] | | 6 | ### [Fri Dec 30 21:00:59 CET 2005 : schwarz] |
7 | ### make sys/types.h not conflict with inttypes.h | | 7 | ### make sys/types.h not conflict with inttypes.h |
8 | ### (issue is specific to IRIX 5.3) | | 8 | ### (issue is specific to IRIX 5.3) |
9 | ### | | 9 | ### |
10 | . if !empty(MACHINE_PLATFORM:MIRIX-5.3-*) | | 10 | . if !empty(MACHINE_PLATFORM:MIRIX-5.3-*) |
11 | PKG_HACKS+= sys_types_h-inttypes_h-conflict | | 11 | PKG_HACKS+= sys_types_h-inttypes_h-conflict |
12 | post-wrapper: | | 12 | post-wrapper: |
13 | ${MKDIR} ${BUILDLINK_DIR}/include/sys && ${GREP} -v '^typedef.*[^u_]int[12368]*_t;' /usr/include/sys/types.h > ${BUILDLINK_DIR}/include/sys/types.h | | 13 | ${MKDIR} ${BUILDLINK_DIR}/include/sys && ${GREP} -v '^typedef.*[^u_]int[12368]*_t;' /usr/include/sys/types.h > ${BUILDLINK_DIR}/include/sys/types.h |
14 | # should match int8_t, int16_t, and int32_t (only) | | 14 | # should match int8_t, int16_t, and int32_t (only) |
| @@ -24,15 +24,31 @@ post-wrapper: | | | @@ -24,15 +24,31 @@ post-wrapper: |
24 | PKG_HACKS+= no-strict-aliasing | | 24 | PKG_HACKS+= no-strict-aliasing |
25 | CFLAGS+= -fno-strict-aliasing | | 25 | CFLAGS+= -fno-strict-aliasing |
26 | PKG_HACKS+= gcc-fast-math | | 26 | PKG_HACKS+= gcc-fast-math |
27 | CFLAGS+= -ffast-math | | 27 | CFLAGS+= -ffast-math |
28 | . endif | | 28 | . endif |
29 | | | 29 | |
30 | . if !empty(CC_VERSION:Mgcc-[4-9]*) | | 30 | . if !empty(CC_VERSION:Mgcc-[4-9]*) |
31 | # Don't hide symbols for glut by default, it doesn't know how to unhide them. | | 31 | # Don't hide symbols for glut by default, it doesn't know how to unhide them. |
32 | . if empty(PKGNAME:M*glut*) | | 32 | . if empty(PKGNAME:M*glut*) |
33 | PKG_HACKS+= gcc-hidden-visibility | | 33 | PKG_HACKS+= gcc-hidden-visibility |
34 | CFLAGS+= -fvisibility=hidden | | 34 | CFLAGS+= -fvisibility=hidden |
35 | . endif | | 35 | . endif |
36 | . endif | | 36 | . endif |
| | | 37 | ### |
| | | 38 | ### XXX this shoddy hack is here to fix the unresolved symbol error that |
| | | 39 | ### results due to '.extern pthread_getspecific' in the x86 and x86-64 |
| | | 40 | ### assembler dispatch routines. This should be removed ASAP! |
| | | 41 | ### |
| | | 42 | . include "../../mk/bsd.fast.prefs.mk" |
| | | 43 | |
| | | 44 | . if ${OPSYS} == "NetBSD" && !empty(MACHINE_ARCH:M*86*) && \ |
| | | 45 | empty(PTHREAD_STUBLIB:U:M*pthstub*) |
| | | 46 | SUBST_CLASSES+= asm-hack |
| | | 47 | SUBST_FILES.asm-hack= src/mesa/x86/glapi_x86.S |
| | | 48 | SUBST_FILES.asm-jack+= src/mesa/x86/glapi_x86-64.S |
| | | 49 | SUBST_MESSAGE.asm-hack+=Teaching x86 assembler code about NetBSD thread stubs |
| | | 50 | SUBST_SED.asm-hack= -e 's,pthread_getspecific,__libc_thr_getspecific,g' |
| | | 51 | SUBST_STAGE.asm-hack= post-patch |
| | | 52 | . endif |
37 | | | 53 | |
38 | .endif | | 54 | .endif |