ipq40xx: only include ath10k-board-qca4019 for the generic subtarget
[openwrt/staging/chunkeey.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 +librt +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 +librt +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 +librt +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 +librt +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 endef
243
244 define Package/libc/config
245 menu "Configuration"
246 depends on EXTERNAL_TOOLCHAIN && PACKAGE_libc
247
248 config LIBC_ROOT_DIR
249 string
250 prompt "libc shared library base directory"
251 depends on EXTERNAL_TOOLCHAIN && PACKAGE_libc
252 default TOOLCHAIN_ROOT if !NATIVE_TOOLCHAIN
253 default "/" if NATIVE_TOOLCHAIN
254
255 config LIBC_FILE_SPEC
256 string
257 prompt "libc shared library files (use wildcards)"
258 depends on EXTERNAL_TOOLCHAIN && PACKAGE_libc
259 default "./lib/ld{*.so*,-linux*.so.*} ./lib/lib{anl,c,cidn,crypt,dl,m,nsl,nss_dns,nss_files,resolv,util}{-*.so,.so.*,.so}"
260
261 endmenu
262 endef
263
264
265 define Package/libpthread
266 $(call Package/libc/Default)
267 TITLE:=POSIX thread library
268 endef
269
270 define Package/libpthread/config
271 menu "Configuration"
272 depends on EXTERNAL_TOOLCHAIN && PACKAGE_libpthread
273
274 config LIBPTHREAD_ROOT_DIR
275 string
276 prompt "libpthread shared library base directory"
277 depends on EXTERNAL_TOOLCHAIN && PACKAGE_libpthread
278 default TOOLCHAIN_ROOT if !NATIVE_TOOLCHAIN
279 default "/" if NATIVE_TOOLCHAIN
280
281 config LIBPTHREAD_FILE_SPEC
282 string
283 prompt "libpthread shared library files (use wildcards)"
284 depends on EXTERNAL_TOOLCHAIN && PACKAGE_libpthread
285 default "./lib/libpthread{-*.so,.so.*}"
286
287 endmenu
288 endef
289
290
291 define Package/libthread-db
292 $(call Package/libc/Default)
293 DEPENDS:=@!USE_MUSL
294 TITLE:=POSIX thread library debugging support
295 endef
296
297 define Package/libthread-db/config
298 menu "Configuration"
299 depends on EXTERNAL_TOOLCHAIN && PACKAGE_libthread-db
300
301 config LIBTHREAD_DB_ROOT_DIR
302 string
303 prompt "POSIX thread debugging shared library base directory"
304 depends on EXTERNAL_TOOLCHAIN && PACKAGE_libthread-db
305 default TOOLCHAIN_ROOT if !NATIVE_TOOLCHAIN
306 default "/" if NATIVE_TOOLCHAIN
307
308 config LIBTHREAD_DB_FILE_SPEC
309 string
310 prompt "POSIX thread debugging shared library files (use wildcards)"
311 depends on EXTERNAL_TOOLCHAIN && PACKAGE_libthread-db
312 default "./lib/libthread_db{-*.so,.so.*}"
313
314 endmenu
315 endef
316
317 define Package/librt
318 $(call Package/libc/Default)
319 TITLE:=POSIX.1b RealTime extension library
320 DEPENDS:=+libpthread
321 endef
322
323 define Package/librt/config
324 menu "Configuration"
325 depends on EXTERNAL_TOOLCHAIN && PACKAGE_librt
326
327 config LIBRT_ROOT_DIR
328 string
329 prompt "librt shared library base directory"
330 depends on EXTERNAL_TOOLCHAIN && PACKAGE_librt
331 default TOOLCHAIN_ROOT if !NATIVE_TOOLCHAIN
332 default "/" if NATIVE_TOOLCHAIN
333
334 config LIBRT_FILE_SPEC
335 string
336 prompt "librt shared library files (use wildcards)"
337 depends on EXTERNAL_TOOLCHAIN && PACKAGE_librt
338 default "./lib/librt{-*.so,.so.*}"
339
340 endmenu
341 endef
342
343
344 define Package/libgfortran
345 $(call Package/gcc/Default)
346 TITLE:=GFortran support library
347 DEPENDS+=@INSTALL_GFORTRAN
348 endef
349
350 define Package/libgfortran/config
351 menu "Configuration"
352 depends on EXTERNAL_TOOLCHAIN && PACKAGE_libgfortran
353
354 config LIBGFORTRAN_ROOT_DIR
355 string
356 prompt "libgfortran shared library base directory"
357 depends on EXTERNAL_TOOLCHAIN && PACKAGE_libgfortran
358 default TOOLCHAIN_ROOT if !NATIVE_TOOLCHAIN
359 default "/" if NATIVE_TOOLCHAIN
360
361 config LIBGFORTRAN_FILE_SPEC
362 string
363 prompt "libgfortran shared library files (use wildcards)"
364 depends on EXTERNAL_TOOLCHAIN && PACKAGE_libgfortran
365 default "./usr/lib/libgfortran.so.*"
366
367 endmenu
368 endef
369
370 define Package/libgomp
371 $(call Package/gcc/Default)
372 TITLE:=OpenMP support library
373 endef
374
375 define Package/libgomp/config
376 menu "Configuration"
377 depends on EXTERNAL_TOOLCHAIN && PACKAGE_libgomp
378
379 config LIBGOMP_ROOT_DIR
380 string
381 prompt "libgomp shared library base directory"
382 depends on EXTERNAL_TOOLCHAIN && PACKAGE_libgomp
383 default TOOLCHAIN_ROOT if !NATIVE_TOOLCHAIN
384 default "/" if NATIVE_TOOLCHAIN
385
386 config LIBGOMP_FILE_SPEC
387 string
388 prompt "libgomp shared library files (use wildcards)"
389 depends on EXTERNAL_TOOLCHAIN && PACKAGE_libgomp
390 default "./lib/libgomp.so*"
391
392 endmenu
393 endef
394
395
396 define Package/ldd
397 $(call Package/libc/Default)
398 DEPENDS:=@!USE_MUSL
399 SECTION:=utils
400 CATEGORY:=Utilities
401 TITLE:=LDD trace utility
402 endef
403
404 define Package/ldd/config
405 menu "Configuration"
406 depends on EXTERNAL_TOOLCHAIN && PACKAGE_ldd
407
408 config LDD_ROOT_DIR
409 string
410 prompt "ldd trace utility base directory"
411 depends on EXTERNAL_TOOLCHAIN && PACKAGE_ldd
412 default TOOLCHAIN_ROOT if !NATIVE_TOOLCHAIN
413 default "/" if NATIVE_TOOLCHAIN
414
415 config LDD_FILE_SPEC
416 string
417 prompt "ldd trace utility file"
418 depends on EXTERNAL_TOOLCHAIN && PACKAGE_ldd
419 default "./usr/bin/ldd"
420
421 endmenu
422 endef
423
424
425 define Package/ldconfig
426 $(call Package/libc/Default)
427 DEPENDS:=@!USE_MUSL
428 SECTION:=utils
429 CATEGORY:=Utilities
430 TITLE:=Shared library path configuration
431 endef
432
433 define Package/ldconfig/config
434 menu "Configuration"
435 depends on EXTERNAL_TOOLCHAIN && PACKAGE_ldconfig
436
437 config LDCONFIG_ROOT_DIR
438 string
439 prompt "ldconfig base directory"
440 depends on EXTERNAL_TOOLCHAIN && PACKAGE_ldconfig
441 default TOOLCHAIN_ROOT if !NATIVE_TOOLCHAIN
442 default "/" if NATIVE_TOOLCHAIN
443
444 config LDCONFIG_FILE_SPEC
445 string
446 prompt "ldconfig file"
447 depends on EXTERNAL_TOOLCHAIN && PACKAGE_ldconfig
448 default "./sbin/ldconfig"
449
450 endmenu
451 endef
452
453 define Build/Prepare
454 mkdir -p $(PKG_BUILD_DIR)
455 endef
456
457 LIBGCC_A=$(lastword $(wildcard $(TOOLCHAIN_DIR)/lib/gcc/*/*/libgcc_pic.a))
458 LIBGCC_MAP=$(lastword $(wildcard $(TOOLCHAIN_DIR)/lib/gcc/*/*/libgcc.map))
459 LIBGCC_SO=$(lastword $(wildcard $(TOOLCHAIN_DIR)/lib/libgcc_s.so.*))
460
461 ifneq ($(LIBGCC_SO),)
462 define Build/Compile/libgcc
463 $(CP) $(LIBGCC_SO) $(PKG_BUILD_DIR)/
464 endef
465 endif
466
467 define Build/Compile/Default
468 $(call Build/Compile/libgcc)
469 $(call Build/Compile/$(LIBC))
470 endef
471 Build/Compile = $(Build/Compile/Default)
472
473 ifeq ($(CONFIG_EXTERNAL_TOOLCHAIN),)
474
475 define Package/libgcc/install
476 $(INSTALL_DIR) $(1)/lib
477 $(CP) $(TOOLCHAIN_DIR)/lib/libgcc_s.so.* $(1)/lib/
478 endef
479
480 define Package/libatomic/install
481 $(INSTALL_DIR) $(1)/lib
482 $(CP) $(TOOLCHAIN_DIR)/lib/libatomic.so.* $(1)/lib/
483 endef
484
485 define Package/libgfortran/install
486 $(INSTALL_DIR) $(1)/usr/lib
487 $(CP) $(TOOLCHAIN_DIR)/lib/libgfortran.so.* $(1)/usr/lib/
488 endef
489
490 define Package/libstdcpp/install
491 $(INSTALL_DIR) $(1)/usr/lib
492 $(CP) $(TOOLCHAIN_DIR)/lib/libstdc++.so.* $(1)/usr/lib/
493 rm -rf $(1)/usr/lib/*-gdb.py
494 endef
495
496 define Package/libasan/install
497 $(INSTALL_DIR) $(1)/lib
498 $(CP) $(TOOLCHAIN_DIR)/lib/libasan.so.* $(1)/lib/
499 endef
500
501 define Package/libtsan/install
502 $(INSTALL_DIR) $(1)/lib
503 $(CP) $(TOOLCHAIN_DIR)/lib/libtsan.so.* $(1)/lib/
504 endef
505
506 define Package/liblsan/install
507 $(INSTALL_DIR) $(1)/lib
508 $(CP) $(TOOLCHAIN_DIR)/lib/liblsan.so.* $(1)/lib/
509 endef
510
511 define Package/libubsan/install
512 $(INSTALL_DIR) $(1)/lib
513 $(CP) $(TOOLCHAIN_DIR)/lib/libubsan.so.* $(1)/lib/
514 endef
515
516 define Package/glibc/install
517 $(CP) ./glibc-files/* $(1)/
518 rm -f $(1)/etc/localtime
519 $(LN) /tmp/localtime $(1)/etc/localtime
520 $(INSTALL_DIR) $(1)/lib
521 $(CP) \
522 $(TOOLCHAIN_DIR)/lib/ld*.so.* \
523 $(1)/lib/
524 for file in libanl libc libcidn libcrypt libdl libm libnsl libnss_dns libnss_files libresolv libutil; do \
525 for file in $(TOOLCHAIN_DIR)/lib/$$$$file.so.*; do \
526 if [ -e "$$$$file" ]; then \
527 $(CP) $$$$file $(1)/lib/; \
528 fi; \
529 done; \
530 done
531 endef
532
533 LD_MUSL_NAME = $(notdir $(firstword $(wildcard $(TOOLCHAIN_DIR)/lib/libc.so*)))
534
535 define Package/musl/install
536 $(INSTALL_DIR) $(1)/lib $(1)/usr/bin
537 $(CP) \
538 $(TOOLCHAIN_DIR)/lib/ld-musl-*.so* \
539 $(1)/lib/
540 $(CP) \
541 $(TOOLCHAIN_DIR)/lib/libc.so* \
542 $(1)/lib/
543 $(LN) ../../lib/$(LD_MUSL_NAME) $(1)/usr/bin/ldd
544 endef
545
546 define Package/libc/install
547 $(call Package/$(LIBC)/install,$1)
548 endef
549
550 define Package/libc/install_lib
551 $(CP) $(filter-out %/libdl_pic.a %/libpthread_pic.a %/libresolv_pic.a,$(wildcard $(TOOLCHAIN_DIR)/lib/lib*.a)) $(1)/lib/
552 $(if $(wildcard $(TOOLCHAIN_DIR)/lib/libc_so.a),$(CP) $(TOOLCHAIN_DIR)/lib/libc_so.a $(1)/lib/libc_pic.a)
553 $(if $(LIBGCC_MAP), \
554 $(CP) $(LIBGCC_A) $(1)/lib/libgcc_s_pic.a; \
555 $(CP) $(LIBGCC_MAP) $(1)/lib/libgcc_s_pic.map \
556 )
557 endef
558
559 define Package/libpthread/install
560 $(INSTALL_DIR) $(1)/lib
561 ifneq ($(CONFIG_USE_MUSL),y)
562 $(CP) \
563 $(TOOLCHAIN_DIR)/lib/libpthread.so.* \
564 $(1)/lib/
565 endif
566 endef
567
568 define Package/libthread-db/install
569 $(INSTALL_DIR) $(1)/lib
570 $(CP) \
571 $(TOOLCHAIN_DIR)/lib/libthread_db.so.* $(1)/lib
572 endef
573
574 define Package/libpthread/install_lib
575 $(if $(wildcard $(TOOLCHAIN_DIR)/lib/libpthread_so.a),$(CP) $(TOOLCHAIN_DIR)/lib/libpthread_so.a $(1)/lib/libpthread_pic.a)
576 endef
577
578 define Package/librt/install
579 $(INSTALL_DIR) $(1)/lib
580 ifneq ($(CONFIG_USE_MUSL),y)
581 $(CP) \
582 $(TOOLCHAIN_DIR)/lib/librt.so.* \
583 $(1)/lib/
584 endif
585 endef
586
587 define Package/ldd/install
588 $(INSTALL_DIR) $(1)/usr/bin/
589 $(CP) $(TOOLCHAIN_DIR)/bin/ldd $(1)/usr/bin/
590 sed -i 's,^#!.*,#!/bin/sh,' $(1)/usr/bin/ldd
591 endef
592
593 define Package/ldconfig/install
594 $(INSTALL_DIR) $(1)/sbin/
595 $(CP) $(TOOLCHAIN_DIR)/sbin/ldconfig $(1)/sbin/
596 endef
597
598 else
599
600 define Package/libgcc/install
601 for file in $(call qstrip,$(CONFIG_LIBGCC_FILE_SPEC)); do \
602 $(INSTALL_DIR) $(1)/lib ; \
603 $(CP) $(call qstrip,$(CONFIG_LIBGCC_ROOT_DIR))/$$$$file $(1)/lib/ ; \
604 done ; \
605 exit 0
606 endef
607
608 define Package/libgfortran/install
609 for file in $(call qstrip,$(CONFIG_LIBGFORTRAN_FILE_SPEC)); do \
610 $(INSTALL_DIR) $(1)/lib ; \
611 $(CP) $(call qstrip,$(CONFIG_LIBGFORTRAN_ROOT_DIR))/$$$$file $(1)/lib/ ; \
612 done
613 endef
614
615 define Package/libstdcpp/install
616 for file in $(call qstrip,$(CONFIG_LIBSTDCPP_FILE_SPEC)); do \
617 $(INSTALL_DIR) $(1)/lib ; \
618 $(CP) $(call qstrip,$(CONFIG_LIBSTDCPP_ROOT_DIR))/$$$$file $(1)/lib/ ; \
619 done ; \
620 exit 0
621 endef
622
623 define Package/libasan/install
624 for file in $(call qstrip,$(CONFIG_LIBASAN_FILE_SPEC)); do \
625 $(INSTALL_DIR) $(1)/lib ; \
626 $(CP) $(call qstrip,$(CONFIG_LIBASAN_ROOT_DIR))/$$$$file $(1)/lib/ ; \
627 done ; \
628 exit 0
629 endef
630
631 define Package/libtsan/install
632 for file in $(call qstrip,$(CONFIG_LIBTSAN_FILE_SPEC)); do \
633 $(INSTALL_DIR) $(1)/lib ; \
634 $(CP) $(call qstrip,$(CONFIG_LIBTSAN_ROOT_DIR))/$$$$file $(1)/lib/ ; \
635 done ; \
636 exit 0
637 endef
638
639 define Package/liblsan/install
640 for file in $(call qstrip,$(CONFIG_LIBLSAN_FILE_SPEC)); do \
641 $(INSTALL_DIR) $(1)/lib ; \
642 $(CP) $(call qstrip,$(CONFIG_LIBLSAN_ROOT_DIR))/$$$$file $(1)/lib/ ; \
643 done ; \
644 exit 0
645 endef
646
647 define Package/libubsan/install
648 for file in $(call qstrip,$(CONFIG_LIBUBSAN_FILE_SPEC)); do \
649 $(INSTALL_DIR) $(1)/lib ; \
650 $(CP) $(call qstrip,$(CONFIG_LIBUBSAN_ROOT_DIR))/$$$$file $(1)/lib/ ; \
651 done ; \
652 exit 0
653 endef
654
655 define Package/libc/install
656 for file in $(call qstrip,$(CONFIG_LIBC_FILE_SPEC)); do \
657 $(INSTALL_DIR) $(1)/lib ; \
658 $(CP) $(call qstrip,$(CONFIG_LIBC_ROOT_DIR))/$$$$file $(1)/lib/ ; \
659 done ; \
660 exit 0
661 endef
662
663 define Package/libpthread/install
664 for file in $(call qstrip,$(CONFIG_LIBPTHREAD_FILE_SPEC)); do \
665 $(INSTALL_DIR) $(1)/lib ; \
666 $(CP) $(call qstrip,$(CONFIG_LIBPTHREAD_ROOT_DIR))/$$$$file $(1)/lib/ ; \
667 done ; \
668 exit 0
669 endef
670
671 define Package/libthread-db/install
672 for file in $(call qstrip,$(CONFIG_LIBTHREAD_DB_FILE_SPEC)); do \
673 $(INSTALL_DIR) $(1)/lib ; \
674 $(CP) $(call qstrip,$(CONFIG_LIBTHREAD_DB_ROOT_DIR))/$$$$file $(1)/lib/ ; \
675 done ; \
676 exit 0
677 endef
678
679 define Package/librt/install
680 for file in $(call qstrip,$(CONFIG_LIBRT_FILE_SPEC)); do \
681 $(INSTALL_DIR) $(1)/lib ; \
682 $(CP) $(call qstrip,$(CONFIG_LIBRT_ROOT_DIR))/$$$$file $(1)/lib/ ; \
683 done ; \
684 exit 0
685 endef
686
687 define Package/libatomic/install
688 for file in $(call qstrip,$(CONFIG_LIBATOMIC_FILE_SPEC)); do \
689 $(INSTALL_DIR) $(1)/lib ; \
690 $(CP) $(call qstrip,$(CONFIG_LIBATOMIC_ROOT_DIR))/$$$$file $(1)/lib/ ; \
691 done ; \
692 exit 0
693 endef
694
695 define Package/libgomp/install
696 for file in $(call qstrip,$(CONFIG_LIBGOMP_FILE_SPEC)); do \
697 $(INSTALL_DIR) $(1)/lib ; \
698 $(CP) $(call qstrip,$(CONFIG_LIBGOMP_ROOT_DIR))/$$$$file $(1)/lib/ ; \
699 done ; \
700 exit 0
701 endef
702
703 define Package/ldd/install
704 for file in $(call qstrip,$(CONFIG_LDD_FILE_SPEC)); do \
705 dir=`dirname $$$$file` ; \
706 $(INSTALL_DIR) $(1)/$$$$dir ; \
707 $(CP) $(call qstrip,$(CONFIG_LDD_ROOT_DIR))/$$$$file $(1)/$$$$dir/ ; \
708 done ; \
709 exit 0
710 endef
711
712 define Package/ldconfig/install
713 for file in $(call qstrip,$(CONFIG_LDCONFIG_FILE_SPEC)); do \
714 dir=`dirname $$$$file` ; \
715 $(INSTALL_DIR) $(1)/$$$$dir ; \
716 $(CP) $(call qstrip,$(CONFIG_LDCONFIG_ROOT_DIR))/$$$$file $(1)/$$$$dir/ ; \
717 done ; \
718 exit 0
719 endef
720
721 endif
722
723 $(eval $(call BuildPackage,libc))
724 $(eval $(call BuildPackage,libgcc))
725 $(eval $(call BuildPackage,libatomic))
726 $(eval $(call BuildPackage,libstdcpp))
727 $(eval $(call BuildPackage,libasan))
728 $(eval $(call BuildPackage,libtsan))
729 $(eval $(call BuildPackage,liblsan))
730 $(eval $(call BuildPackage,libubsan))
731 $(eval $(call BuildPackage,libpthread))
732 $(eval $(call BuildPackage,libthread-db))
733 $(eval $(call BuildPackage,librt))
734 $(eval $(call BuildPackage,libgfortran))
735 $(eval $(call BuildPackage,libgomp))
736 $(eval $(call BuildPackage,ldd))
737 $(eval $(call BuildPackage,ldconfig))