1 # This file is part of the OpenADK project. OpenADK is copyrighted
2 # material, please see the LICENCE file in the top-level directory.
6 include $(ADK_TOPDIR
)/rules.mk
9 include ${ADK_TOPDIR}/mk
/buildhlp.mk
12 TARGET_CFLAGS
:= $(filter-out -flto
,$(TARGET_CFLAGS
))
13 # handled by uClibc-ng makefiles
14 TARGET_CFLAGS
:= $(filter-out -fstack-protector-all
,$(TARGET_CFLAGS
))
15 TARGET_LDFLAGS
:=$(filter-out -fstack-protector-all
,$(TARGET_LDFLAGS
))
16 # don't use fast-math for C library
17 TARGET_CFLAGS
:= $(filter-out -ffast-math
,$(TARGET_CFLAGS
))
19 ifeq ($(ADK_TARGET_USE_STATIC_AND_SHARED_LIBS
),y
)
20 TARGET_CFLAGS
:= $(filter-out -static
,$(TARGET_CFLAGS
))
21 TARGET_LDFLAGS
:=$(filter-out -static
,$(TARGET_LDFLAGS
))
24 ifeq ($(ADK_BUILD_COMPILER_GCC
),y
)
25 ifeq ($(ADK_TARGET_HARD_FLOAT
),y
)
26 ifeq ($(ADK_TARGET_HARD_FLOAT_SP
),y
)
27 ifeq ($(ADK_TARGET_HARD_FLOAT_DP
),y
)
28 ifeq ($(ADK_TARGET_ARCH_ARM
),y
)
29 TARGET_CFLAGS
+= -Wa
,-mfloat-abi
=hard
33 ifeq ($(ADK_TARGET_ARCH_MIPS
),y
)
34 TARGET_CFLAGS
+= -Wa
,-mhard-float
38 ifeq ($(ADK_TARGET_SOFT_FLOAT
),y
)
39 ifeq ($(ADK_TARGET_ARCH_ARM
),y
)
40 TARGET_CFLAGS
+= -Wa
,-mfloat-abi
=soft
42 ifeq ($(ADK_TARGET_ARCH_MIPS
),y
)
43 TARGET_CFLAGS
+= -Wa
,-msoft-float
48 ifeq (${ADK_MAKE_PARALLEL},y
)
49 UCLIBC_MAKEOPTS
+= -j
${ADK_MAKE_JOBS}
52 $(WRKBUILD
)/.configured
: $(WRKBUILD
)/.prepared
53 ifeq ($(ADK_TARGET_WITH_MMU
),y
)
54 PATH
='$(HOST_PATH)' sed
-e
's\x01^KERNEL_HEADERS.*$$\x01KERNEL_HEADERS=\"${STAGING_TARGET_DIR}/usr/include\"\x01' \
55 $(ADK_TOPDIR
)/target
/$(ADK_TARGET_ARCH
)/uclibc-ng.config
>${WRKBUILD}/.config
57 PATH
='$(HOST_PATH)' sed
-e
's\x01^KERNEL_HEADERS.*$$\x01KERNEL_HEADERS=\"${STAGING_TARGET_DIR}/usr/include\"\x01' \
58 $(ADK_TOPDIR
)/target
/$(ADK_TARGET_ARCH
)/uclibc-ng-nommu.config
>${WRKBUILD}/.config
60 $(SED
) 's^.*\(CROSS_COMPILER_PREFIX\).*^\1=\"$(TARGET_CROSS)\"^' ${WRKBUILD}/.config
61 ifeq ($(ADK_TARGET_ENDIAN
),little
)
62 $(SED
) 's/.*\(ARCH_LITTLE_ENDIAN\).*/\1=y/' ${WRKBUILD}/.config
63 $(SED
) 's/.*\(ARCH_WANTS_LITTLE_ENDIAN\).*/\1=y/' ${WRKBUILD}/.config
64 $(SED
) 's/.*\(ARCH_BIG_ENDIAN\).*/# \1 is not set/' ${WRKBUILD}/.config
65 $(SED
) 's/.*\(ARCH_WANTS_BIG_ENDIAN\).*/# \1 is not set/' ${WRKBUILD}/.config
67 $(SED
) 's/.*\(ARCH_BIG_ENDIAN\).*/\1=y/' ${WRKBUILD}/.config
68 $(SED
) 's/.*\(ARCH_WANTS_BIG_ENDIAN\).*/\1=y/' ${WRKBUILD}/.config
69 $(SED
) 's/.*\(ARCH_LITTLE_ENDIAN\).*/# \1 is not set/' ${WRKBUILD}/.config
70 $(SED
) 's/.*\(ARCH_WANTS_LITTLE_ENDIAN\).*/# \1 is not set/' ${WRKBUILD}/.config
72 ifeq ($(ADK_TARGET_SOFT_FLOAT
),y
)
73 $(SED
) 's/.*\(UCLIBC_HAS_FPU\).*/# \1 is not set/' ${WRKBUILD}/.config
74 $(SED
) 's/.*\(UCLIBC_HAS_SOFT_FLOAT\).*/#\1=y/' ${WRKBUILD}/.config
76 ifeq ($(ADK_TARGET_HARD_FLOAT
),y
)
77 $(SED
) 's/.*\(UCLIBC_HAS_FPU\).*/\1=y/' ${WRKBUILD}/.config
78 $(SED
) 's/.*\(UCLIBC_HAS_SOFT_FLOAT\).*/# \1 is not set/' ${WRKBUILD}/.config
80 ifeq ($(ADK_TARGET_HARD_FLOAT_SP
),y
)
81 $(SED
) 's/.*\(UCLIBC_HAS_FPU\).*/\1=y/' ${WRKBUILD}/.config
82 $(SED
) 's/.*\(UCLIBC_HAS_SOFT_FLOAT\).*/# \1 is not set/' ${WRKBUILD}/.config
84 ifeq ($(ADK_TARGET_HARD_FLOAT_DP
),y
)
85 $(SED
) 's/.*\(UCLIBC_HAS_FPU\).*/\1=y/' ${WRKBUILD}/.config
86 $(SED
) 's/.*\(UCLIBC_HAS_SOFT_FLOAT\).*/# \1 is not set/' ${WRKBUILD}/.config
88 ifeq ($(ADK_TARGET_BINFMT_ELF
),y
)
89 $(SED
) 's/.*\(UCLIBC_FORMAT_ELF\).*/\1=y/' ${WRKBUILD}/.config
90 $(SED
) 's/.*\(UCLIBC_FORMAT_FDPIC_ELF\).*/# \1 is not set/' ${WRKBUILD}/.config
91 $(SED
) 's/.*\(UCLIBC_FORMAT_FLAT\).*/# \1 is not set/' ${WRKBUILD}/.config
92 $(SED
) 's/.*\(UCLIBC_FORMAT_FLAT_SEP_DATA\).*/# \1 is not set/' ${WRKBUILD}/.config
93 $(SED
) 's/.*\(UCLIBC_FORMAT_SHARED_FLAT\).*/# \1 is not set/' ${WRKBUILD}/.config
95 ifeq ($(ADK_TARGET_BINFMT_FDPIC
),y
)
96 $(SED
) 's/.*\(UCLIBC_FORMAT_FDPIC_ELF\).*/\1=y/' ${WRKBUILD}/.config
97 $(SED
) 's/.*\(UCLIBC_FORMAT_ELF\).*/# \1 is not set/' ${WRKBUILD}/.config
98 $(SED
) 's/.*\(UCLIBC_FORMAT_FLAT\).*/# \1 is not set/' ${WRKBUILD}/.config
99 $(SED
) 's/.*\(UCLIBC_FORMAT_FLAT_SEP_DATA\).*/# \1 is not set/' ${WRKBUILD}/.config
100 $(SED
) 's/.*\(UCLIBC_FORMAT_SHARED_FLAT\).*/# \1 is not set/' ${WRKBUILD}/.config
102 ifeq ($(ADK_TARGET_BINFMT_FLAT
),y
)
103 echo
'# UCLIBC_FORMAT_FLAT is not set' >> ${WRKBUILD}/.config
104 $(SED
) 's/.*\(UCLIBC_FORMAT_FLAT\).*/\1=y/' ${WRKBUILD}/.config
105 $(SED
) 's/.*\(UCLIBC_FORMAT_FLAT_SEP_DATA\).*/# \1 is not set/' ${WRKBUILD}/.config
106 $(SED
) 's/.*\(UCLIBC_FORMAT_SHARED_FLAT\).*/# \1 is not set/' ${WRKBUILD}/.config
107 $(SED
) 's/.*\(UCLIBC_FORMAT_FDPIC_ELF\).*/# \1 is not set/' ${WRKBUILD}/.config
108 ifeq ($(ADK_TARGET_BINFMT_FLAT_SEP_DATA
),y
)
109 echo
'# UCLIBC_FORMAT_FLAT_SEP_DATA is not set' >> ${WRKBUILD}/.config
110 $(SED
) 's/.*\(UCLIBC_FORMAT_FLAT_SEP_DATA\).*/\1=y/' ${WRKBUILD}/.config
111 $(SED
) 's/.*\(UCLIBC_FORMAT_FLAT \).*/# \1 is not set/' ${WRKBUILD}/.config
112 $(SED
) 's/.*\(UCLIBC_FORMAT_SHARED_FLAT\).*/# \1 is not set/' ${WRKBUILD}/.config
113 $(SED
) 's/.*\(UCLIBC_FORMAT_FDPIC_ELF\).*/# \1 is not set/' ${WRKBUILD}/.config
115 ifeq ($(ADK_TARGET_BINFMT_FLAT_SHARED
),y
)
116 echo
'# UCLIBC_FORMAT_SHARED_FLAT is not set' >> ${WRKBUILD}/.config
117 echo
'# HAVE_NO_SHARED is not set' >> ${WRKBUILD}/.config
118 $(SED
) 's/.*\(UCLIBC_FORMAT_SHARED_FLAT\).*/\1=y/' ${WRKBUILD}/.config
119 $(SED
) 's/.*\(UCLIBC_FORMAT_FLAT \).*/# \1 is not set/' ${WRKBUILD}/.config
120 $(SED
) 's/.*\(UCLIBC_FORMAT_FLAT_SEP_DATA\).*/# \1 is not set/' ${WRKBUILD}/.config
121 $(SED
) 's/.*\(UCLIBC_FORMAT_FDPIC_ELF\).*/# \1 is not set/' ${WRKBUILD}/.config
124 ifeq ($(ADK_TARGET_LIBC_WITH_LIBICONV
),y
)
125 $(SED
) 's/.*\(UCLIBC_HAS_LIBICONV\).*/\1=y/' ${WRKBUILD}/.config
127 ifeq ($(ADK_TARGET_LIBC_WITH_LIBINTL
),y
)
128 $(SED
) 's/.*\(UCLIBC_HAS_LIBINTL\).*/\1=y/' ${WRKBUILD}/.config
130 ifeq ($(ADK_TARGET_LIBC_WITH_LOCALE
),y
)
131 $(SED
) 's/.*\(UCLIBC_HAS_LOCALE\).*/\1=y/' ${WRKBUILD}/.config
132 echo
'UCLIBC_HAS_XLOCALE=y' >> ${WRKBUILD}/.config
134 ifeq ($(ADK_TARGET_UCLINUX
),y
)
135 $(SED
) 's/.*\(ARCH_USE_MMU\).*/# \1 is not set/' ${WRKBUILD}/.config
137 ifeq ($(ADK_TARGET_WITH_MMU
),)
138 $(SED
) 's/.*\(ARCH_USE_MMU\).*/# \1 is not set/' ${WRKBUILD}/.config
140 ifeq ($(ADK_TARGET_WITH_NPTL
),y
)
141 $(SED
) 's/.*\(UCLIBC_HAS_THREADS_NATIVE\).*/\1=y/' ${WRKBUILD}/.config
142 $(SED
) 's/.*\(UCLIBC_HAS_TLS\).*/\1=y/' ${WRKBUILD}/.config
143 $(SED
) 's/.*\(PTHREADS_DEBUG_SUPPORT\).*/\1=y/' ${WRKBUILD}/.config
144 $(SED
) 's/.*\(UCLIBC_HAS_LINUXTHREADS\).*/# \1 is not set/' ${WRKBUILD}/.config
145 $(SED
) 's/.*\(HAS_NO_THREADS\).*/# \1 is not set/' ${WRKBUILD}/.config
147 ifeq ($(ADK_TARGET_WITH_LT
),y
)
148 echo
'# UCLIBC_HAS_THREADS is not set' >> ${WRKBUILD}/.config
149 echo
'# UCLIBC_HAS_LINUXTHREADS is not set' >> ${WRKBUILD}/.config
150 $(SED
) 's/.*\(UCLIBC_HAS_THREADS_NATIVE\).*/# \1 is not set/' ${WRKBUILD}/.config
151 $(SED
) 's/.*\(UCLIBC_HAS_TLS\).*/# \1 is not set/' ${WRKBUILD}/.config
152 $(SED
) 's/.*\(UCLIBC_HAS_THREADS\).*/\1=y/' ${WRKBUILD}/.config
153 $(SED
) 's/.*\(UCLIBC_HAS_LINUXTHREADS\).*/\1=y/' ${WRKBUILD}/.config
154 $(SED
) 's/.*\(HAS_NO_THREADS\).*/# \1 is not set/' ${WRKBUILD}/.config
156 ifeq ($(ADK_TARGET_LIB_WITHOUT_THREADS
)$(ADK_TARGET_WITHOUT_THREADS
),y
)
157 $(SED
) 's/.*\(UCLIBC_HAS_LINUXTHREADS\).*/# \1 is not set/' ${WRKBUILD}/.config
158 $(SED
) 's/.*\(UCLIBC_HAS_THREADS_NATIVE\).*/# \1 is not set/' ${WRKBUILD}/.config
159 $(SED
) 's/.*\(UCLIBC_HAS_TLS\).*/# \1 is not set/' ${WRKBUILD}/.config
160 $(SED
) 's/.*\(PTHREADS_DEBUG_SUPPORT\).*/# \1 is not set/' ${WRKBUILD}/.config
161 $(SED
) 's/.*\(HAS_NO_THREADS\).*/\1=y/' ${WRKBUILD}/.config
163 ifeq ($(ADK_TARGET_USE_STATIC_LIBS_ONLY
)$(ADK_TARGET_BINFMT_FLAT
),)
164 $(SED
) 's/.*\(HAVE_SHARED\).*/\1=y/' ${WRKBUILD}/.config
166 $(SED
) 's/.*\(HAVE_SHARED\).*/# \1 is not set/' ${WRKBUILD}/.config
168 ifeq ($(ADK_TARGET_USE_GNU_HASHSTYLE
),y
)
169 $(SED
) 's/.*\(LDSO_GNU_HASH_SUPPORT\).*/\1=y/' ${WRKBUILD}/.config
171 $(SED
) 's/.*\(LDSO_GNU_HASH_SUPPORT\).*/# \1 is not set/' ${WRKBUILD}/.config
173 ifeq ($(ADK_TARGET_USE_SSP
),y
)
174 $(SED
) 's,.*UCLIBC_HAS_SSP,UCLIBC_HAS_SSP=y,' ${WRKBUILD}/.config
175 echo
"UCLIBC_HAS_SSP_COMPAT=n" >> ${WRKBUILD}/.config
176 echo
"SSP_QUICK_CANARY=n" >> ${WRKBUILD}/.config
177 echo
"UCLIBC_BUILD_SSP=y" >> ${WRKBUILD}/.config
179 ifeq ($(ADK_DEBUG
),y
)
180 $(SED
) 's/.*\(DODEBUG\).*/\1=y/' ${WRKBUILD}/.config
184 # architecture specific options
188 ifeq ($(ADK_TARGET_ARCH_ARC
),y
)
189 ifeq ($(ADK_TARGET_CPU_ARC_ARC700
),y
)
190 $(SED
) 's/.*\(CONFIG_ARC_PAGE_SIZE_16K\).*/# \1 is not set/' ${WRKBUILD}/.config
191 $(SED
) 's/.*\(CONFIG_ARC_PAGE_SIZE_4K\).*/# \1 is not set/' ${WRKBUILD}/.config
192 $(SED
) 's/.*\(CONFIG_ARC_PAGE_SIZE_8K\).*/\1=y/' ${WRKBUILD}/.config
194 ifeq ($(ADK_TARGET_CPU_ARC_ARCHS
),y
)
195 $(SED
) 's/.*\(CONFIG_ARC_PAGE_SIZE_16K\).*/# \1 is not set/' ${WRKBUILD}/.config
196 $(SED
) 's/.*\(CONFIG_ARC_PAGE_SIZE_4K\).*/# \1 is not set/' ${WRKBUILD}/.config
197 $(SED
) 's/.*\(CONFIG_ARC_PAGE_SIZE_8K\).*/\1=y/' ${WRKBUILD}/.config
199 ifeq ($(ADK_TARGET_CPU_ARC_ARC32
),y
)
200 $(SED
) 's/.*\(CONFIG_ARC_PAGE_SIZE_16K\).*/# \1 is not set/' ${WRKBUILD}/.config
201 $(SED
) 's/.*\(CONFIG_ARC_PAGE_SIZE_8K\).*/# \1 is not set/' ${WRKBUILD}/.config
202 $(SED
) 's/.*\(CONFIG_ARC_PAGE_SIZE_4K\).*/\1=y/' ${WRKBUILD}/.config
207 ifeq ($(ADK_TARGET_ARCH_ARM
),y
)
208 ifeq ($(ADK_TARGET_WITH_MMU
),)
209 $(SED
) 's/.*\(DOPIC\).*/# \1 is not set/' ${WRKBUILD}/.config
211 ifeq ($(ADK_TARGET_ARCH_ARM_WITH_THUMB
),y
)
212 $(SED
) 's/.*\(UCLIBC_HAS_CONTEXT_FUNCS\).*/# \1 is not set/' ${WRKBUILD}/.config
217 ifeq ($(ADK_TARGET_ARCH_CRIS
),y
)
218 ifeq ($(ADK_TARGET_CPU_CRIS_CRISV32
),y
)
219 $(SED
) 's/.*\(CONFIG_CRIS=\).*/# \1 is not set/' ${WRKBUILD}/.config
220 $(SED
) 's/.*\(CONFIG_CRISV32\).*/\1=y/' ${WRKBUILD}/.config
222 ifeq ($(ADK_TARGET_CPU_CRIS_CRISV10
),y
)
223 $(SED
) 's/.*\(CONFIG_CRIS=\).*/\1=y/' ${WRKBUILD}/.config
224 $(SED
) 's/.*\(CONFIG_CRISV32\).*/# \1 is not set/' ${WRKBUILD}/.config
229 ifeq ($(ADK_TARGET_ARCH_H8300
),y
)
230 ifeq ($(ADK_TARGET_CPU_H8300H
),y
)
231 $(SED
) 's/.*\(CONFIG_H8S\).*/# \1 is not set/' ${WRKBUILD}/.config
232 $(SED
) 's/.*\(CONFIG_H8300H\).*/\1=y/' ${WRKBUILD}/.config
234 ifeq ($(ADK_TARGET_CPU_H8S
),y
)
235 $(SED
) 's/.*\(CONFIG_H8S\).*/\1=y/' ${WRKBUILD}/.config
236 $(SED
) 's/.*\(CONFIG_H8300H\).*/# \1 is not set/' ${WRKBUILD}/.config
241 ifeq ($(ADK_TARGET_ARCH_SH
),y
)
242 ifeq ($(ADK_TARGET_CPU_SH_SH4A
),y
)
243 $(SED
) 's/.*\(CONFIG_SH2A\).*/# \1 is not set/' ${WRKBUILD}/.config
244 $(SED
) 's/.*\(CONFIG_SH2\).*/# \1 is not set/' ${WRKBUILD}/.config
245 $(SED
) 's/.*\(CONFIG_SH3\).*/# \1 is not set/' ${WRKBUILD}/.config
246 $(SED
) 's/.*\(CONFIG_SH4=\).*/# \1 is not set/' ${WRKBUILD}/.config
247 $(SED
) 's/.*\(CONFIG_SH4A\).*/\1=y/' ${WRKBUILD}/.config
249 ifeq ($(ADK_TARGET_CPU_SH_SH4
),y
)
250 $(SED
) 's/.*\(CONFIG_SH2A\).*/# \1 is not set/' ${WRKBUILD}/.config
251 $(SED
) 's/.*\(CONFIG_SH2\).*/# \1 is not set/' ${WRKBUILD}/.config
252 $(SED
) 's/.*\(CONFIG_SH3\).*/# \1 is not set/' ${WRKBUILD}/.config
253 $(SED
) 's/.*\(CONFIG_SH4A\).*/# \1 is not set/' ${WRKBUILD}/.config
254 $(SED
) 's/.*\(CONFIG_SH4\).*/\1=y/' ${WRKBUILD}/.config
256 ifeq ($(ADK_TARGET_CPU_SH_SH3
),y
)
257 $(SED
) 's/.*\(UCLIBC_HAS_FPU\).*/# \1 is not set/' ${WRKBUILD}/.config
258 $(SED
) 's/.*\(CONFIG_SH2A\).*/# \1 is not set/' ${WRKBUILD}/.config
259 $(SED
) 's/.*\(CONFIG_SH2\).*/# \1 is not set/' ${WRKBUILD}/.config
260 $(SED
) 's/.*\(CONFIG_SH4\).*/# \1 is not set/' ${WRKBUILD}/.config
261 $(SED
) 's/.*\(CONFIG_SH4A\).*/# \1 is not set/' ${WRKBUILD}/.config
262 $(SED
) 's/.*\(CONFIG_SH3\).*/\1=y/' ${WRKBUILD}/.config
264 ifeq ($(ADK_TARGET_CPU_SH_SH2
)$(ADK_TARGET_CPU_SH_J2
),y
)
265 $(SED
) 's/.*\(UCLIBC_HAS_FPU\).*/# \1 is not set/' ${WRKBUILD}/.config
266 $(SED
) 's/.*\(CONFIG_SH2A\).*/# \1 is not set/' ${WRKBUILD}/.config
267 $(SED
) 's/.*\(CONFIG_SH3\).*/# \1 is not set/' ${WRKBUILD}/.config
268 $(SED
) 's/.*\(CONFIG_SH4\).*/# \1 is not set/' ${WRKBUILD}/.config
269 $(SED
) 's/.*\(CONFIG_SH4A\).*/# \1 is not set/' ${WRKBUILD}/.config
270 $(SED
) 's/.*\(CONFIG_SH2\).*/\1=y/' ${WRKBUILD}/.config
272 ifeq ($(ADK_TARGET_CPU_SH_SH2A
),y
)
273 $(SED
) 's/.*\(UCLIBC_HAS_FPU\).*/# \1 is not set/' ${WRKBUILD}/.config
274 $(SED
) 's/.*\(CONFIG_SH2\).*/# \1 is not set/' ${WRKBUILD}/.config
275 $(SED
) 's/.*\(CONFIG_SH3\).*/# \1 is not set/' ${WRKBUILD}/.config
276 $(SED
) 's/.*\(CONFIG_SH4\).*/# \1 is not set/' ${WRKBUILD}/.config
277 $(SED
) 's/.*\(CONFIG_SH4A\).*/# \1 is not set/' ${WRKBUILD}/.config
278 $(SED
) 's/.*\(CONFIG_SH2A\).*/\1=y/' ${WRKBUILD}/.config
283 ifeq ($(ADK_TARGET_ARCH_X86
),y
)
284 ifeq ($(ADK_TARGET_CPU_X86_I486
),y
)
285 $(SED
) 's/.*\(CONFIG_686\).*/# \1 is not set/' ${WRKBUILD}/.config
286 $(SED
) 's/.*\(CONFIG_586\).*/# \1 is not set/' ${WRKBUILD}/.config
287 $(SED
) 's/.*\(CONFIG_486\).*/\1=y/' ${WRKBUILD}/.config
289 ifeq ($(ADK_TARGET_CPU_X86_I586
),y
)
290 $(SED
) 's/.*\(CONFIG_686\).*/# \1 is not set/' ${WRKBUILD}/.config
291 $(SED
) 's/.*\(CONFIG_586\).*/\1=y/' ${WRKBUILD}/.config
292 $(SED
) 's/.*\(CONFIG_486\).*/# \1 is not set/' ${WRKBUILD}/.config
294 ifeq ($(ADK_TARGET_CPU_X86_I686
),y
)
295 $(SED
) 's/.*\(CONFIG_686\).*/\1=y/' ${WRKBUILD}/.config
296 $(SED
) 's/.*\(CONFIG_586\).*/# \1 is not set/' ${WRKBUILD}/.config
297 $(SED
) 's/.*\(CONFIG_486\).*/# \1 is not set/' ${WRKBUILD}/.config
302 ifeq ($(ADK_TARGET_ARCH_M68K
),y
)
303 ifeq ($(ADK_TARGET_WITH_MMU
),)
304 ifeq ($(ADK_TARGET_BINFMT_FLAT_ONE
)$(ADK_TARGET_BINFMT_FLAT_SEP_DATA
),y
)
305 $(SED
) 's/.*\(DOPIC\).*/# \1 is not set/' ${WRKBUILD}/.config
311 ifeq ($(ADK_TARGET_ARCH_MIPS_WITH_NAN_2008
),y
)
312 $(SED
) 's/.*\(CONFIG_MIPS_NAN_LEGACY\).*/# \1 is not set/' ${WRKBUILD}/.config
313 $(SED
) 's/.*\(CONFIG_MIPS_NAN_2008\).*/\1=y/' ${WRKBUILD}/.config
315 ifeq ($(ADK_TARGET_ARCH_MIPS_WITH_NAN_LEGACY
),y
)
316 $(SED
) 's/.*\(CONFIG_MIPS_NAN_2008\).*/# \1 is not set/' ${WRKBUILD}/.config
317 $(SED
) 's/.*\(CONFIG_MIPS_NAN_LEGACY\).*/\1=y/' ${WRKBUILD}/.config
321 ifeq ($(ADK_TARGET_ARCH_MIPS64
),y
)
322 ifeq ($(ADK_TARGET_ABI_N64
),y
)
323 $(SED
) 's/.*\(CONFIG_MIPS_N64_ABI\).*/\1=y/' ${WRKBUILD}/.config
324 $(SED
) 's/.*\(CONFIG_MIPS_O32_ABI\).*/# \1 is not set/' ${WRKBUILD}/.config
325 $(SED
) 's/.*\(CONFIG_MIPS_N32_ABI\).*/# \1 is not set/' ${WRKBUILD}/.config
327 ifeq ($(ADK_TARGET_ABI_N32
),y
)
328 $(SED
) 's/.*\(CONFIG_MIPS_N32_ABI\).*/\1=y/' ${WRKBUILD}/.config
329 $(SED
) 's/.*\(CONFIG_MIPS_O32_ABI\).*/# \1 is not set/' ${WRKBUILD}/.config
330 $(SED
) 's/.*\(CONFIG_MIPS_N64_ABI\).*/# \1 is not set/' ${WRKBUILD}/.config
332 ifeq ($(ADK_TARGET_ABI_O32
),y
)
333 $(SED
) 's/.*\(CONFIG_MIPS_O32_ABI\).*/\1=y/' ${WRKBUILD}/.config
334 $(SED
) 's/.*\(CONFIG_MIPS_N32_ABI\).*/# \1 is not set/' ${WRKBUILD}/.config
335 $(SED
) 's/.*\(CONFIG_MIPS_N64_ABI\).*/# \1 is not set/' ${WRKBUILD}/.config
338 echo N|PATH
='$(HOST_PATH)' $(MAKE
) -C
$(WRKBUILD
) \
339 HOSTCC
="$(HOST_CC)" \
341 PREFIX
=$(STAGING_TARGET_DIR
) \
343 RUNTIME_PREFIX
=$(STAGING_TARGET_DIR
) \
344 UCLIBC_EXTRA_CFLAGS
="$(TARGET_CFLAGS)" \
345 UCLIBC_EXTRA_LDFLAGS
="$(TARGET_LDFLAGS)" \
347 ifeq ($(ADK_TARGET_LIBC_WITH_LOCALE
),y
)
348 $(SED
) 's/.*\(UCLIBC_BUILD_MINIMAL_LOCALES\).*/\1="$(ADK_RUNTIME_DEFAULT_LOCALE)"/' ${WRKBUILD}/.config
352 $(WRKBUILD
)/.compiled
: $(WRKBUILD
)/.configured
353 PATH
='$(HOST_PATH)' $(MAKE
) $(UCLIBC_MAKEOPTS
) -C
$(WRKBUILD
) \
354 ARCH
="$(ADK_TARGET_ARCH)" \
355 CROSS_COMPILE
="$(TARGET_CROSS)" \
356 HOSTCC
="$(HOST_CC)" \
357 PREFIX
=$(STAGING_TARGET_DIR
) \
360 UCLIBC_EXTRA_CFLAGS
="$(TARGET_CFLAGS)" \
361 UCLIBC_EXTRA_LDFLAGS
="$(TARGET_LDFLAGS)" \
364 ifeq ($(ADK_TARGET_LIBC_UTILS
),y
)
365 PATH
='$(HOST_PATH)' $(MAKE
) $(UCLIBC_MAKEOPTS
) -C
$(WRKBUILD
) \
366 ARCH
="$(ADK_TARGET_ARCH)" \
367 CROSS_COMPILE
="$(TARGET_CROSS)" \
368 HOSTCC
="$(HOST_CC)" \
369 PREFIX
=$(STAGING_TARGET_DIR
) \
372 UCLIBC_EXTRA_CFLAGS
="$(TARGET_CFLAGS)" \
373 UCLIBC_EXTRA_LDFLAGS
="$(TARGET_LDFLAGS)" \
379 $(WRKBUILD
)/.installed
: $(WRKBUILD
)/.compiled
380 PATH
='$(HOST_PATH)' $(MAKE
) -C
$(WRKBUILD
) \
381 ARCH
="$(ADK_TARGET_ARCH)" \
382 CROSS_COMPILE
="$(TARGET_CROSS)" \
383 HOSTCC
="$(HOST_CC)" \
384 PREFIX
=$(STAGING_TARGET_DIR
) \
387 UCLIBC_EXTRA_CFLAGS
="$(TARGET_CFLAGS)" \
388 UCLIBC_EXTRA_LDFLAGS
="$(TARGET_LDFLAGS)" \
390 install_runtime install_dev
391 ln
-f
${STAGING_TARGET_DIR}/usr
/lib
/crt1.o \
392 ${STAGING_TARGET_DIR}/usr
/lib
/Scrt1.o
393 ifeq ($(ADK_TARGET_LIBC_UTILS
),y
)
394 PATH
='$(HOST_PATH)' $(MAKE
) -C
$(WRKBUILD
) \
395 ARCH
="$(ADK_TARGET_ARCH)" \
396 CROSS_COMPILE
="$(TARGET_CROSS)" \
397 HOSTCC
="$(HOST_CC)" \
398 PREFIX
=$(STAGING_TARGET_DIR
) \
401 UCLIBC_EXTRA_CFLAGS
="$(TARGET_CFLAGS)" \
402 UCLIBC_EXTRA_LDFLAGS
="$(TARGET_LDFLAGS)" \
408 include ${ADK_TOPDIR}/mk
/toolchain.mk