treewide: drop librt and libpthread packages
[openwrt/staging/jow.git] / package / libs / toolchain / Makefile
1 #
2 # Copyright (C) 2007-2014 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9 PKG_NAME:=toolchain
10 PKG_RELEASE:=4
11
12 PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
13 PKG_LICENSE:=GPL-3.0-with-GCC-exception
14
15 PKG_FLAGS:=hold essential nonshared
16
17 include $(INCLUDE_DIR)/package.mk
18
19 ifneq ($(DUMP),1)
20 LIBGCC_VERSION:=$(GCC_VERSION)
21 else
22 LIBC_VERSION:=<LIBC_VERSION>
23 LIBGCC_VERSION:=<LIBGCC_VERSION>
24 endif
25
26 define Package/gcc/Default
27 SECTION:=libs
28 CATEGORY:=Base system
29 URL:=http://gcc.gnu.org/
30 VERSION:=$(LIBGCC_VERSION)-$(PKG_RELEASE)
31 endef
32
33 define Package/libgcc
34 $(call Package/gcc/Default)
35 TITLE:=GCC support library
36 ABI_VERSION:=1
37 endef
38
39 define Package/libgcc/config
40 menu "Configuration"
41 depends on EXTERNAL_TOOLCHAIN && PACKAGE_libgcc
42
43 config LIBGCC_ROOT_DIR
44 string
45 prompt "libgcc shared library base directory"
46 depends on EXTERNAL_TOOLCHAIN && PACKAGE_libgcc
47 default TOOLCHAIN_ROOT if !NATIVE_TOOLCHAIN
48 default "/" if NATIVE_TOOLCHAIN
49
50 config LIBGCC_FILE_SPEC
51 string
52 prompt "libgcc shared library files (use wildcards)"
53 depends on EXTERNAL_TOOLCHAIN && PACKAGE_libgcc
54 default "./lib/libgcc_s.so.*"
55
56 endmenu
57 endef
58
59 define Package/libatomic
60 $(call Package/gcc/Default)
61 DEPENDS:=+libgcc
62 TITLE:=Atomic support library
63 ABI_VERSION:=1
64 endef
65
66 define Package/libatomic/config
67 menu "Configuration"
68 depends on EXTERNAL_TOOLCHAIN && PACKAGE_libatomic
69
70 config LIBATOMIC_ROOT_DIR
71 string
72 prompt "libatomic shared library base directory"
73 depends on EXTERNAL_TOOLCHAIN && PACKAGE_libatomic
74 default TOOLCHAIN_ROOT if !NATIVE_TOOLCHAIN
75 default "/" if NATIVE_TOOLCHAIN
76
77 config LIBATOMIC_FILE_SPEC
78 string
79 prompt "libatomic shared library files (use wildcards)"
80 depends on EXTERNAL_TOOLCHAIN && PACKAGE_libatomic
81 default "./lib/libatomic.so.*"
82
83 endmenu
84 endef
85
86 define Package/libstdcpp
87 $(call Package/gcc/Default)
88 NAME:=libstdc++
89 TITLE:=GNU Standard C++ Library v3
90 ABI_VERSION:=6
91 endef
92
93 define Package/libstdcpp/config
94 menu "Configuration"
95 depends on EXTERNAL_TOOLCHAIN && PACKAGE_libstdcpp
96
97 config LIBSTDCPP_ROOT_DIR
98 string
99 prompt "libstdcpp shared library base directory"
100 depends on EXTERNAL_TOOLCHAIN && PACKAGE_libstdcpp
101 default TOOLCHAIN_ROOT if !NATIVE_TOOLCHAIN
102 default "/" if NATIVE_TOOLCHAIN
103
104 config LIBSTDCPP_FILE_SPEC
105 string
106 prompt "libstdc++ shared library files (use wildcards)"
107 depends on EXTERNAL_TOOLCHAIN && PACKAGE_libstdcpp
108 default "./lib/libstdc++.so.*"
109
110 endmenu
111 endef
112
113
114 define Package/libasan
115 $(call Package/gcc/Default)
116 NAME:=libasan
117 TITLE:=Runtime library for AddressSanitizer in GCC
118 DEPENDS:=@USE_GLIBC +libstdcpp @!mips64 @!mips64el @!arc
119 ABI_VERSION:=5
120 endef
121
122 define Package/libasan/config
123 menu "Configuration"
124 depends on EXTERNAL_TOOLCHAIN && PACKAGE_libasan
125
126 config LIBASAN_ROOT_DIR
127 string
128 prompt "libasan shared library base directory"
129 depends on EXTERNAL_TOOLCHAIN && PACKAGE_libasan
130 default TOOLCHAIN_ROOT if !NATIVE_TOOLCHAIN
131 default "/" if NATIVE_TOOLCHAIN
132
133 config LIBASAN_FILE_SPEC
134 string
135 prompt "libasan shared library files (use wildcards)"
136 depends on EXTERNAL_TOOLCHAIN && PACKAGE_libasan
137 default "./lib/libasan.so.*"
138
139 endmenu
140 endef
141
142
143 define Package/libtsan
144 $(call Package/gcc/Default)
145 NAME:=libtsan
146 TITLE:=Runtime library for ThreadSanitizer in GCC
147 DEPENDS:=@USE_GLIBC +libstdcpp @!mips @!mipsel @!mips64 @!mips64el @!arc
148 ABI_VERSION:=0
149 endef
150
151 define Package/libtsan/config
152 menu "Configuration"
153 depends on EXTERNAL_TOOLCHAIN && PACKAGE_libtsan
154
155 config LIBTSAN_ROOT_DIR
156 string
157 prompt "libtsan shared library base directory"
158 depends on EXTERNAL_TOOLCHAIN && PACKAGE_libtsan
159 default TOOLCHAIN_ROOT if !NATIVE_TOOLCHAIN
160 default "/" if NATIVE_TOOLCHAIN
161
162 config LIBTSAN_FILE_SPEC
163 string
164 prompt "libtsan shared library files (use wildcards)"
165 depends on EXTERNAL_TOOLCHAIN && PACKAGE_libtsan
166 default "./lib/libtsan.so.*"
167
168 endmenu
169 endef
170
171
172 define Package/liblsan
173 $(call Package/gcc/Default)
174 NAME:=liblsan
175 TITLE:=Runtime library for LeakSanitizer in GCC
176 DEPENDS:=@USE_GLIBC +libstdcpp @!mips @!mipsel @!mips64 @!mips64el @!arc
177 ABI_VERSION:=0
178 endef
179
180 define Package/liblsan/config
181 menu "Configuration"
182 depends on EXTERNAL_TOOLCHAIN && PACKAGE_liblsan
183
184 config LIBLSAN_ROOT_DIR
185 string
186 prompt "liblsan shared library base directory"
187 depends on EXTERNAL_TOOLCHAIN && PACKAGE_liblsan
188 default TOOLCHAIN_ROOT if !NATIVE_TOOLCHAIN
189 default "/" if NATIVE_TOOLCHAIN
190
191 config LIBLSAN_FILE_SPEC
192 string
193 prompt "liblsan shared library files (use wildcards)"
194 depends on EXTERNAL_TOOLCHAIN && PACKAGE_liblsan
195 default "./lib/liblsan.so.*"
196
197 endmenu
198 endef
199
200
201 define Package/libubsan
202 $(call Package/gcc/Default)
203 NAME:=libubsan
204 TITLE:=Runtime library for UndefinedBehaviorSanitizer in GCC
205 DEPENDS:=@USE_GLIBC +libstdcpp @!mips64 @!mips64el @!arc
206 ABI_VERSION:=1
207 endef
208
209 define Package/libubsan/config
210 menu "Configuration"
211 depends on EXTERNAL_TOOLCHAIN && PACKAGE_libubsan
212
213 config LIBUBSAN_ROOT_DIR
214 string
215 prompt "libubsan shared library base directory"
216 depends on EXTERNAL_TOOLCHAIN && PACKAGE_libubsan
217 default TOOLCHAIN_ROOT if !NATIVE_TOOLCHAIN
218 default "/" if NATIVE_TOOLCHAIN
219
220 config LIBUBSAN_FILE_SPEC
221 string
222 prompt "libubsan shared library files (use wildcards)"
223 depends on EXTERNAL_TOOLCHAIN && PACKAGE_libubsan
224 default "./lib/libubsan.so.*"
225
226 endmenu
227 endef
228
229
230 define Package/libc/Default
231 SECTION:=libs
232 CATEGORY:=Base system
233 VERSION:=$(LIBC_VERSION)-$(PKG_RELEASE)
234 DEPENDS:=+libgcc
235 URL:=$(LIBC_URL)
236 endef
237
238
239 define Package/libc
240 $(call Package/libc/Default)
241 TITLE:=C library
242 PROVIDES:=libpthread librt
243 endef
244
245 define Package/libc/config
246 menu "Configuration"
247 depends on EXTERNAL_TOOLCHAIN && PACKAGE_libc
248
249 config LIBC_ROOT_DIR
250 string
251 prompt "libc shared library base directory"
252 depends on EXTERNAL_TOOLCHAIN && PACKAGE_libc
253 default TOOLCHAIN_ROOT if !NATIVE_TOOLCHAIN
254 default "/" if NATIVE_TOOLCHAIN
255
256 config LIBC_FILE_SPEC
257 string
258 prompt "libc shared library files (use wildcards)"
259 depends on EXTERNAL_TOOLCHAIN && PACKAGE_libc
260 default "./lib/ld{*.so*,-linux*.so.*} ./lib/lib{anl,c,cidn,crypt,dl,m,nsl,nss_dns,nss_files,pthread,resolv,rt,util}{-*.so,.so.*,.so}"
261
262 endmenu
263 endef
264
265
266 define Package/libthread-db
267 $(call Package/libc/Default)
268 DEPENDS:=@!USE_MUSL
269 TITLE:=POSIX thread library debugging support
270 endef
271
272 define Package/libthread-db/config
273 menu "Configuration"
274 depends on EXTERNAL_TOOLCHAIN && PACKAGE_libthread-db
275
276 config LIBTHREAD_DB_ROOT_DIR
277 string
278 prompt "POSIX thread debugging shared library base directory"
279 depends on EXTERNAL_TOOLCHAIN && PACKAGE_libthread-db
280 default TOOLCHAIN_ROOT if !NATIVE_TOOLCHAIN
281 default "/" if NATIVE_TOOLCHAIN
282
283 config LIBTHREAD_DB_FILE_SPEC
284 string
285 prompt "POSIX thread debugging shared library files (use wildcards)"
286 depends on EXTERNAL_TOOLCHAIN && PACKAGE_libthread-db
287 default "./lib/libthread_db{-*.so,.so.*}"
288
289 endmenu
290 endef
291
292 define Package/libgfortran
293 $(call Package/gcc/Default)
294 TITLE:=GFortran support library
295 DEPENDS+=@INSTALL_GFORTRAN
296 endef
297
298 define Package/libgfortran/config
299 menu "Configuration"
300 depends on EXTERNAL_TOOLCHAIN && PACKAGE_libgfortran
301
302 config LIBGFORTRAN_ROOT_DIR
303 string
304 prompt "libgfortran shared library base directory"
305 depends on EXTERNAL_TOOLCHAIN && PACKAGE_libgfortran
306 default TOOLCHAIN_ROOT if !NATIVE_TOOLCHAIN
307 default "/" if NATIVE_TOOLCHAIN
308
309 config LIBGFORTRAN_FILE_SPEC
310 string
311 prompt "libgfortran shared library files (use wildcards)"
312 depends on EXTERNAL_TOOLCHAIN && PACKAGE_libgfortran
313 default "./usr/lib/libgfortran.so.*"
314
315 endmenu
316 endef
317
318 define Package/libgomp
319 $(call Package/gcc/Default)
320 TITLE:=OpenMP support library
321 endef
322
323 define Package/libgomp/config
324 menu "Configuration"
325 depends on EXTERNAL_TOOLCHAIN && PACKAGE_libgomp
326
327 config LIBGOMP_ROOT_DIR
328 string
329 prompt "libgomp shared library base directory"
330 depends on EXTERNAL_TOOLCHAIN && PACKAGE_libgomp
331 default TOOLCHAIN_ROOT if !NATIVE_TOOLCHAIN
332 default "/" if NATIVE_TOOLCHAIN
333
334 config LIBGOMP_FILE_SPEC
335 string
336 prompt "libgomp shared library files (use wildcards)"
337 depends on EXTERNAL_TOOLCHAIN && PACKAGE_libgomp
338 default "./lib/libgomp.so*"
339
340 endmenu
341 endef
342
343
344 define Package/ldd
345 $(call Package/libc/Default)
346 DEPENDS:=@!USE_MUSL
347 SECTION:=utils
348 CATEGORY:=Utilities
349 TITLE:=LDD trace utility
350 endef
351
352 define Package/ldd/config
353 menu "Configuration"
354 depends on EXTERNAL_TOOLCHAIN && PACKAGE_ldd
355
356 config LDD_ROOT_DIR
357 string
358 prompt "ldd trace utility base directory"
359 depends on EXTERNAL_TOOLCHAIN && PACKAGE_ldd
360 default TOOLCHAIN_ROOT if !NATIVE_TOOLCHAIN
361 default "/" if NATIVE_TOOLCHAIN
362
363 config LDD_FILE_SPEC
364 string
365 prompt "ldd trace utility file"
366 depends on EXTERNAL_TOOLCHAIN && PACKAGE_ldd
367 default "./usr/bin/ldd"
368
369 endmenu
370 endef
371
372
373 define Package/ldconfig
374 $(call Package/libc/Default)
375 DEPENDS:=@!USE_MUSL
376 SECTION:=utils
377 CATEGORY:=Utilities
378 TITLE:=Shared library path configuration
379 endef
380
381 define Package/ldconfig/config
382 menu "Configuration"
383 depends on EXTERNAL_TOOLCHAIN && PACKAGE_ldconfig
384
385 config LDCONFIG_ROOT_DIR
386 string
387 prompt "ldconfig base directory"
388 depends on EXTERNAL_TOOLCHAIN && PACKAGE_ldconfig
389 default TOOLCHAIN_ROOT if !NATIVE_TOOLCHAIN
390 default "/" if NATIVE_TOOLCHAIN
391
392 config LDCONFIG_FILE_SPEC
393 string
394 prompt "ldconfig file"
395 depends on EXTERNAL_TOOLCHAIN && PACKAGE_ldconfig
396 default "./sbin/ldconfig"
397
398 endmenu
399 endef
400
401 define Build/Prepare
402 mkdir -p $(PKG_BUILD_DIR)
403 endef
404
405 define Build/Quilt
406 endef
407
408 LIBGCC_A=$(lastword $(wildcard $(TOOLCHAIN_DIR)/lib/gcc/*/*/libgcc_pic.a))
409 LIBGCC_MAP=$(lastword $(wildcard $(TOOLCHAIN_DIR)/lib/gcc/*/*/libgcc.map))
410 LIBGCC_SO=$(lastword $(wildcard $(TOOLCHAIN_DIR)/lib/libgcc_s.so.*))
411
412 ifneq ($(LIBGCC_SO),)
413 define Build/Compile/libgcc
414 $(CP) $(LIBGCC_SO) $(PKG_BUILD_DIR)/
415 endef
416 endif
417
418 define Build/Compile/Default
419 $(call Build/Compile/libgcc)
420 $(call Build/Compile/$(LIBC))
421 endef
422 Build/Compile = $(Build/Compile/Default)
423
424 ifeq ($(CONFIG_EXTERNAL_TOOLCHAIN),)
425
426 define Package/libgcc/install
427 $(INSTALL_DIR) $(1)/lib
428 $(CP) $(TOOLCHAIN_DIR)/lib/libgcc_s.so.* $(1)/lib/
429 endef
430
431 define Package/libatomic/install
432 $(INSTALL_DIR) $(1)/lib
433 $(CP) $(TOOLCHAIN_DIR)/lib/libatomic.so.* $(1)/lib/
434 endef
435
436 define Package/libgfortran/install
437 $(INSTALL_DIR) $(1)/usr/lib
438 $(CP) $(TOOLCHAIN_DIR)/lib/libgfortran.so.* $(1)/usr/lib/
439 endef
440
441 define Package/libstdcpp/install
442 $(INSTALL_DIR) $(1)/usr/lib
443 $(CP) $(TOOLCHAIN_DIR)/lib/libstdc++.so.* $(1)/usr/lib/
444 rm -rf $(1)/usr/lib/*-gdb.py
445 endef
446
447 define Package/libasan/install
448 $(INSTALL_DIR) $(1)/lib
449 $(CP) $(TOOLCHAIN_DIR)/lib/libasan.so.* $(1)/lib/
450 endef
451
452 define Package/libtsan/install
453 $(INSTALL_DIR) $(1)/lib
454 $(CP) $(TOOLCHAIN_DIR)/lib/libtsan.so.* $(1)/lib/
455 endef
456
457 define Package/liblsan/install
458 $(INSTALL_DIR) $(1)/lib
459 $(CP) $(TOOLCHAIN_DIR)/lib/liblsan.so.* $(1)/lib/
460 endef
461
462 define Package/libubsan/install
463 $(INSTALL_DIR) $(1)/lib
464 $(CP) $(TOOLCHAIN_DIR)/lib/libubsan.so.* $(1)/lib/
465 endef
466
467 define Package/glibc/install
468 $(CP) ./glibc-files/* $(1)/
469 rm -f $(1)/etc/localtime
470 $(LN) /tmp/localtime $(1)/etc/localtime
471 $(INSTALL_DIR) $(1)/lib
472 $(CP) \
473 $(TOOLCHAIN_DIR)/lib/ld*.so.* \
474 $(1)/lib/
475 for file in libanl libc libcidn libcrypt libdl libm libnsl libnss_dns libnss_files libpthread libresolv librt libutil; do \
476 for file in $(TOOLCHAIN_DIR)/lib/$$$$file.so.*; do \
477 if [ -e "$$$$file" ]; then \
478 $(CP) $$$$file $(1)/lib/; \
479 fi; \
480 done; \
481 done
482 endef
483
484 LD_MUSL_NAME = $(notdir $(firstword $(wildcard $(TOOLCHAIN_DIR)/lib/libc.so*)))
485
486 define Package/musl/install
487 $(INSTALL_DIR) $(1)/lib $(1)/usr/bin
488 $(CP) \
489 $(TOOLCHAIN_DIR)/lib/ld-musl-*.so* \
490 $(1)/lib/
491 $(CP) \
492 $(TOOLCHAIN_DIR)/lib/libc.so* \
493 $(1)/lib/
494 $(LN) ../../lib/$(LD_MUSL_NAME) $(1)/usr/bin/ldd
495 endef
496
497 define Package/libc/install
498 $(call Package/$(LIBC)/install,$1)
499 endef
500
501 define Package/libc/install_lib
502 $(CP) $(filter-out %/libdl_pic.a %/libpthread_pic.a %/libresolv_pic.a,$(wildcard $(TOOLCHAIN_DIR)/lib/lib*.a)) $(1)/lib/
503 $(if $(wildcard $(TOOLCHAIN_DIR)/lib/libc_so.a),$(CP) $(TOOLCHAIN_DIR)/lib/libc_so.a $(1)/lib/libc_pic.a)
504 $(if $(wildcard $(TOOLCHAIN_DIR)/lib/libpthread_so.a),$(CP) $(TOOLCHAIN_DIR)/lib/libpthread_so.a $(1)/lib/libpthread_pic.a)
505 $(if $(LIBGCC_MAP), \
506 $(CP) $(LIBGCC_A) $(1)/lib/libgcc_s_pic.a; \
507 $(CP) $(LIBGCC_MAP) $(1)/lib/libgcc_s_pic.map \
508 )
509 endef
510
511 define Package/libthread-db/install
512 $(INSTALL_DIR) $(1)/lib
513 $(CP) \
514 $(TOOLCHAIN_DIR)/lib/libthread_db.so.* $(1)/lib
515 endef
516
517 define Package/ldd/install
518 $(INSTALL_DIR) $(1)/usr/bin/
519 $(CP) $(TOOLCHAIN_DIR)/bin/ldd $(1)/usr/bin/
520 sed -i 's,^#!.*,#!/bin/sh,' $(1)/usr/bin/ldd
521 endef
522
523 define Package/ldconfig/install
524 $(INSTALL_DIR) $(1)/sbin/
525 $(CP) $(TOOLCHAIN_DIR)/sbin/ldconfig $(1)/sbin/
526 endef
527
528 else
529
530 define Package/libgcc/install
531 for file in $(call qstrip,$(CONFIG_LIBGCC_FILE_SPEC)); do \
532 $(INSTALL_DIR) $(1)/lib ; \
533 $(CP) $(call qstrip,$(CONFIG_LIBGCC_ROOT_DIR))/$$$$file $(1)/lib/ ; \
534 done ; \
535 exit 0
536 endef
537
538 define Package/libgfortran/install
539 for file in $(call qstrip,$(CONFIG_LIBGFORTRAN_FILE_SPEC)); do \
540 $(INSTALL_DIR) $(1)/lib ; \
541 $(CP) $(call qstrip,$(CONFIG_LIBGFORTRAN_ROOT_DIR))/$$$$file $(1)/lib/ ; \
542 done
543 endef
544
545 define Package/libstdcpp/install
546 for file in $(call qstrip,$(CONFIG_LIBSTDCPP_FILE_SPEC)); do \
547 $(INSTALL_DIR) $(1)/lib ; \
548 $(CP) $(call qstrip,$(CONFIG_LIBSTDCPP_ROOT_DIR))/$$$$file $(1)/lib/ ; \
549 done ; \
550 exit 0
551 endef
552
553 define Package/libasan/install
554 for file in $(call qstrip,$(CONFIG_LIBASAN_FILE_SPEC)); do \
555 $(INSTALL_DIR) $(1)/lib ; \
556 $(CP) $(call qstrip,$(CONFIG_LIBASAN_ROOT_DIR))/$$$$file $(1)/lib/ ; \
557 done ; \
558 exit 0
559 endef
560
561 define Package/libtsan/install
562 for file in $(call qstrip,$(CONFIG_LIBTSAN_FILE_SPEC)); do \
563 $(INSTALL_DIR) $(1)/lib ; \
564 $(CP) $(call qstrip,$(CONFIG_LIBTSAN_ROOT_DIR))/$$$$file $(1)/lib/ ; \
565 done ; \
566 exit 0
567 endef
568
569 define Package/liblsan/install
570 for file in $(call qstrip,$(CONFIG_LIBLSAN_FILE_SPEC)); do \
571 $(INSTALL_DIR) $(1)/lib ; \
572 $(CP) $(call qstrip,$(CONFIG_LIBLSAN_ROOT_DIR))/$$$$file $(1)/lib/ ; \
573 done ; \
574 exit 0
575 endef
576
577 define Package/libubsan/install
578 for file in $(call qstrip,$(CONFIG_LIBUBSAN_FILE_SPEC)); do \
579 $(INSTALL_DIR) $(1)/lib ; \
580 $(CP) $(call qstrip,$(CONFIG_LIBUBSAN_ROOT_DIR))/$$$$file $(1)/lib/ ; \
581 done ; \
582 exit 0
583 endef
584
585 define Package/glibc/install
586 endef
587
588 LD_MUSL_NAME = $(notdir $(firstword $(wildcard $(TOOLCHAIN_ROOT_DIR)/lib/libc.so*)))
589
590 define Package/musl/install
591 $(INSTALL_DIR) $(1)/usr/bin
592 $(LN) ../../lib/$(LD_MUSL_NAME) $(1)/usr/bin/ldd
593 endef
594
595 define Package/libc/install
596 for file in $(call qstrip,$(CONFIG_LIBC_FILE_SPEC)); do \
597 $(INSTALL_DIR) $(1)/lib ; \
598 $(CP) $(call qstrip,$(CONFIG_LIBC_ROOT_DIR))/$$$$file $(1)/lib/ ; \
599 done ; \
600 exit 0
601 $(call Package/$(LIBC)/install,$1)
602 endef
603
604 define Package/libthread-db/install
605 for file in $(call qstrip,$(CONFIG_LIBTHREAD_DB_FILE_SPEC)); do \
606 $(INSTALL_DIR) $(1)/lib ; \
607 $(CP) $(call qstrip,$(CONFIG_LIBTHREAD_DB_ROOT_DIR))/$$$$file $(1)/lib/ ; \
608 done ; \
609 exit 0
610 endef
611
612 define Package/libatomic/install
613 for file in $(call qstrip,$(CONFIG_LIBATOMIC_FILE_SPEC)); do \
614 $(INSTALL_DIR) $(1)/lib ; \
615 $(CP) $(call qstrip,$(CONFIG_LIBATOMIC_ROOT_DIR))/$$$$file $(1)/lib/ ; \
616 done ; \
617 exit 0
618 endef
619
620 define Package/libgomp/install
621 for file in $(call qstrip,$(CONFIG_LIBGOMP_FILE_SPEC)); do \
622 $(INSTALL_DIR) $(1)/lib ; \
623 $(CP) $(call qstrip,$(CONFIG_LIBGOMP_ROOT_DIR))/$$$$file $(1)/lib/ ; \
624 done ; \
625 exit 0
626 endef
627
628 define Package/ldd/install
629 for file in $(call qstrip,$(CONFIG_LDD_FILE_SPEC)); do \
630 dir=`dirname $$$$file` ; \
631 $(INSTALL_DIR) $(1)/$$$$dir ; \
632 $(CP) $(call qstrip,$(CONFIG_LDD_ROOT_DIR))/$$$$file $(1)/$$$$dir/ ; \
633 done ; \
634 exit 0
635 endef
636
637 define Package/ldconfig/install
638 for file in $(call qstrip,$(CONFIG_LDCONFIG_FILE_SPEC)); do \
639 dir=`dirname $$$$file` ; \
640 $(INSTALL_DIR) $(1)/$$$$dir ; \
641 $(CP) $(call qstrip,$(CONFIG_LDCONFIG_ROOT_DIR))/$$$$file $(1)/$$$$dir/ ; \
642 done ; \
643 exit 0
644 endef
645
646 endif
647
648 $(eval $(call BuildPackage,libc))
649 $(eval $(call BuildPackage,libgcc))
650 $(eval $(call BuildPackage,libatomic))
651 $(eval $(call BuildPackage,libstdcpp))
652 $(eval $(call BuildPackage,libasan))
653 $(eval $(call BuildPackage,libtsan))
654 $(eval $(call BuildPackage,liblsan))
655 $(eval $(call BuildPackage,libubsan))
656 $(eval $(call BuildPackage,libthread-db))
657 $(eval $(call BuildPackage,libgfortran))
658 $(eval $(call BuildPackage,libgomp))
659 $(eval $(call BuildPackage,ldd))
660 $(eval $(call BuildPackage,ldconfig))