Thu Jul 7 08:02:52 2011 UTC ()
for now, compile all the powerpc asm files -DPIC.  fix this properly by
either compiling the dynamic version in a other dir separately, or call
gcc on the fly with the right arguments without generating .S file at all.


(mrg)
diff -r1.2 -r1.3 src/external/lgpl3/gmp/lib/libgmp/arch/powerpc/Makefile.inc

cvs diff -r1.2 -r1.3 src/external/lgpl3/gmp/lib/libgmp/arch/powerpc/Makefile.inc (expand / switch to unified diff)

--- src/external/lgpl3/gmp/lib/libgmp/arch/powerpc/Makefile.inc 2011/07/03 06:43:16 1.2
+++ src/external/lgpl3/gmp/lib/libgmp/arch/powerpc/Makefile.inc 2011/07/07 08:02:52 1.3
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: Makefile.inc,v 1.2 2011/07/03 06:43:16 mrg Exp $ 1# $NetBSD: Makefile.inc,v 1.3 2011/07/07 08:02:52 mrg Exp $
2 2
3SRCS+= \ 3SRCS+= \
4 random.c \ 4 random.c \
5 toom_interpolate_7pts.c \ 5 toom_interpolate_7pts.c \
6 sbpi1_divappr_q.c \ 6 sbpi1_divappr_q.c \
7 random2.c \ 7 random2.c \
8 mu_bdiv_q.c \ 8 mu_bdiv_q.c \
9 toom32_mul.c \ 9 toom32_mul.c \
10 toom44_mul.c \ 10 toom44_mul.c \
11 toom8h_mul.c \ 11 toom8h_mul.c \
12 toom2_sqr.c \ 12 toom2_sqr.c \
13 zero.c \ 13 zero.c \
14 mod_1_4.c \ 14 mod_1_4.c \
@@ -165,31 +165,31 @@ trialdiv.c: trialdivtab.h @@ -165,31 +165,31 @@ trialdiv.c: trialdivtab.h
165trialdivtab.h: gen-trialdivtab 165trialdivtab.h: gen-trialdivtab
166 ${.OBJDIR}/gen-trialdivtab $(GMP_LIMB_BITS) 8000 > ${.OBJDIR}/trialdivtab.h 166 ${.OBJDIR}/gen-trialdivtab $(GMP_LIMB_BITS) 8000 > ${.OBJDIR}/trialdivtab.h
167 167
168CLEANFILES+= trialdivtab.h 168CLEANFILES+= trialdivtab.h
169 169
170# XXX stuff looks for "../config.m4" 170# XXX stuff looks for "../config.m4"
171dummy: 171dummy:
172 mkdir dummy 172 mkdir dummy
173${.OBJDIR}/config.m4: ${.CURDIR}/arch/${MACHINE_ARCH}/config.m4 173${.OBJDIR}/config.m4: ${.CURDIR}/arch/${MACHINE_ARCH}/config.m4
174 cp ${.CURDIR}/arch/${MACHINE_ARCH}/config.m4 ${.TARGET} 174 cp ${.CURDIR}/arch/${MACHINE_ARCH}/config.m4 ${.TARGET}
175 175
176BUILD_S_INCS= -I${.CURDIR} -I${.OBJDIR}/dummy -I${DIST}/ -I${DIST}/mpn 176BUILD_S_INCS= -I${.CURDIR} -I${.OBJDIR}/dummy -I${DIST}/ -I${DIST}/mpn
177 177
178M4FLAGS.mode1s.o= -DPIC 178M4FLAGS= -DPIC
179.for _build _src in ${ASM_SRCS_LIST} 179.for _build _src in ${ASM_SRCS_LIST}
180${_build:R}.s: Makefile dummy ${.OBJDIR}/config.m4 180${_build:R}.s: Makefile dummy ${.OBJDIR}/config.m4
181 ${TOOL_M4} -DCONFIG_TOP_SRCDIR=${DIST} ${BUILD_S_INCS} \ 181 ${TOOL_M4} -DCONFIG_TOP_SRCDIR=${DIST} ${BUILD_S_INCS} \
182 ${M4FLAGS.${.TARGET:R}} \ 182 ${M4FLAGS} ${M4FLAGS.${.TARGET:R}} \
183 -DOPERATION_${.TARGET:R} ${DIST}/${_src} > ${.TARGET} 183 -DOPERATION_${.TARGET:R} ${DIST}/${_src} > ${.TARGET}
184 184
185SRCS+= ${_build:R}.s 185SRCS+= ${_build:R}.s
186CLEANFILES+= ${_build:R}.s 186CLEANFILES+= ${_build:R}.s
187 187
188.endfor 188.endfor
189 189
190.for _build _src in ${C_SRCS_LIST} 190.for _build _src in ${C_SRCS_LIST}
191mpn_${_build}: Makefile 191mpn_${_build}: Makefile
192 echo '#include "${_src}"' > ${.TARGET} 192 echo '#include "${_src}"' > ${.TARGET}
193 193
194CPPFLAGS.mpn_${_build}+= -DOPERATION_${_build:R} 194CPPFLAGS.mpn_${_build}+= -DOPERATION_${_build:R}
195 195