Makefile 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606
  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. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=toolchain
  9. PKG_RELEASE:=1
  10. PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
  11. PKG_LICENSE:=GPL-3.0-with-GCC-exception
  12. PKG_FLAGS:=hold essential nonshared
  13. include $(INCLUDE_DIR)/package.mk
  14. ifneq ($(DUMP),1)
  15. LIBGCC_VERSION:=$(GCC_VERSION)
  16. else
  17. LIBC_VERSION:=<LIBC_VERSION>
  18. LIBGCC_VERSION:=<LIBGCC_VERSION>
  19. endif
  20. define Package/gcc/Default
  21. SECTION:=libs
  22. CATEGORY:=Base system
  23. URL:=http://gcc.gnu.org/
  24. VERSION:=$(LIBGCC_VERSION)-$(PKG_RELEASE)
  25. endef
  26. define Package/libgcc
  27. $(call Package/gcc/Default)
  28. TITLE:=GCC support library
  29. endef
  30. define Package/libgcc/config
  31. menu "Configuration"
  32. depends on EXTERNAL_TOOLCHAIN && PACKAGE_libgcc
  33. config LIBGCC_ROOT_DIR
  34. string
  35. prompt "libgcc shared library base directory"
  36. depends on EXTERNAL_TOOLCHAIN && PACKAGE_libgcc
  37. default TOOLCHAIN_ROOT if !NATIVE_TOOLCHAIN
  38. default "/" if NATIVE_TOOLCHAIN
  39. config LIBGCC_FILE_SPEC
  40. string
  41. prompt "libgcc shared library files (use wildcards)"
  42. depends on EXTERNAL_TOOLCHAIN && PACKAGE_libgcc
  43. default "./lib/libgcc_s.so.*"
  44. endmenu
  45. endef
  46. define Package/libatomic
  47. $(call Package/gcc/Default)
  48. DEPENDS:=+libgcc
  49. TITLE:=Atomic support library
  50. endef
  51. define Package/libatomic/config
  52. menu "Configuration"
  53. depends on EXTERNAL_TOOLCHAIN && PACKAGE_libatomic
  54. config LIBATOMIC_ROOT_DIR
  55. string
  56. prompt "libatomic shared library base directory"
  57. depends on EXTERNAL_TOOLCHAIN && PACKAGE_libatomic
  58. default TOOLCHAIN_ROOT if !NATIVE_TOOLCHAIN
  59. default "/" if NATIVE_TOOLCHAIN
  60. config LIBATOMIC_FILE_SPEC
  61. string
  62. prompt "libatomic shared library files (use wildcards)"
  63. depends on EXTERNAL_TOOLCHAIN && PACKAGE_libatomic
  64. default "./lib/libatomic.so.*"
  65. endmenu
  66. endef
  67. define Package/libssp
  68. $(call Package/gcc/Default)
  69. DEPENDS+=@SSP_SUPPORT
  70. TITLE:=GCC support library
  71. endef
  72. define Package/libssp/config
  73. menu "Configuration"
  74. depends on EXTERNAL_TOOLCHAIN && PACKAGE_libssp
  75. config LIBSSP_ROOT_DIR
  76. string
  77. prompt "libssp shared library base directory"
  78. depends on EXTERNAL_TOOLCHAIN && PACKAGE_libssp
  79. default TOOLCHAIN_ROOT if !NATIVE_TOOLCHAIN
  80. default "/" if NATIVE_TOOLCHAIN
  81. config LIBSSP_FILE_SPEC
  82. string
  83. prompt "libssp shared library files (use wildcards)"
  84. depends on EXTERNAL_TOOLCHAIN && PACKAGE_libssp
  85. default "./lib/libssp.so.*"
  86. endmenu
  87. endef
  88. define Package/libstdcpp
  89. $(call Package/gcc/Default)
  90. NAME:=libstdc++
  91. TITLE:=GNU Standard C++ Library v3
  92. endef
  93. define Package/libstdcpp/config
  94. menu "Configuration"
  95. depends on EXTERNAL_TOOLCHAIN && PACKAGE_libstdcpp
  96. config LIBSTDCPP_ROOT_DIR
  97. string
  98. prompt "libstdcpp shared library base directory"
  99. depends on EXTERNAL_TOOLCHAIN && PACKAGE_libstdcpp
  100. default TOOLCHAIN_ROOT if !NATIVE_TOOLCHAIN
  101. default "/" if NATIVE_TOOLCHAIN
  102. config LIBSTDCPP_FILE_SPEC
  103. string
  104. prompt "libstdc++ shared library files (use wildcards)"
  105. depends on EXTERNAL_TOOLCHAIN && PACKAGE_libstdcpp
  106. default "./lib/libstdc++.so.*"
  107. endmenu
  108. endef
  109. define Package/libc/Default
  110. SECTION:=libs
  111. CATEGORY:=Base system
  112. VERSION:=$(LIBC_VERSION)-$(PKG_RELEASE)
  113. DEPENDS:=+libgcc
  114. URL:=$(LIBC_URL)
  115. endef
  116. define Package/libc
  117. $(call Package/libc/Default)
  118. TITLE:=C library
  119. endef
  120. define Package/libc/config
  121. menu "Configuration"
  122. depends on EXTERNAL_TOOLCHAIN && PACKAGE_libc
  123. config LIBC_ROOT_DIR
  124. string
  125. prompt "libc shared library base directory"
  126. depends on EXTERNAL_TOOLCHAIN && PACKAGE_libc
  127. default TOOLCHAIN_ROOT if !NATIVE_TOOLCHAIN
  128. default "/" if NATIVE_TOOLCHAIN
  129. config LIBC_FILE_SPEC
  130. string
  131. prompt "libc shared library files (use wildcards)"
  132. depends on EXTERNAL_TOOLCHAIN && PACKAGE_libc
  133. default "./lib/ld{*.so*,-linux*.so.*} ./lib/lib{anl,c,cidn,crypt,dl,m,nsl,nss_dns,nss_files,resolv,util}{-*.so,.so.*,.so}"
  134. endmenu
  135. endef
  136. define Package/libpthread
  137. $(call Package/libc/Default)
  138. TITLE:=POSIX thread library
  139. endef
  140. define Package/libpthread/config
  141. menu "Configuration"
  142. depends on EXTERNAL_TOOLCHAIN && PACKAGE_libpthread
  143. config LIBPTHREAD_ROOT_DIR
  144. string
  145. prompt "libpthread shared library base directory"
  146. depends on EXTERNAL_TOOLCHAIN && PACKAGE_libpthread
  147. default TOOLCHAIN_ROOT if !NATIVE_TOOLCHAIN
  148. default "/" if NATIVE_TOOLCHAIN
  149. config LIBPTHREAD_FILE_SPEC
  150. string
  151. prompt "libpthread shared library files (use wildcards)"
  152. depends on EXTERNAL_TOOLCHAIN && PACKAGE_libpthread
  153. default "./lib/libpthread{-*.so,.so.*}"
  154. endmenu
  155. endef
  156. define Package/libthread-db
  157. $(call Package/libc/Default)
  158. DEPENDS:=@!USE_MUSL
  159. TITLE:=POSIX thread library debugging support
  160. endef
  161. define Package/libthread-db/config
  162. menu "Configuration"
  163. depends on EXTERNAL_TOOLCHAIN && PACKAGE_libthread-db
  164. config LIBTHREAD_DB_ROOT_DIR
  165. string
  166. prompt "POSIX thread debugging shared library base directory"
  167. depends on EXTERNAL_TOOLCHAIN && PACKAGE_libthread-db
  168. default TOOLCHAIN_ROOT if !NATIVE_TOOLCHAIN
  169. default "/" if NATIVE_TOOLCHAIN
  170. config LIBTHREAD_DB_FILE_SPEC
  171. string
  172. prompt "POSIX thread debugging shared library files (use wildcards)"
  173. depends on EXTERNAL_TOOLCHAIN && PACKAGE_libthread-db
  174. default "./lib/libthread_db{-*.so,.so.*}"
  175. endmenu
  176. endef
  177. define Package/librt
  178. $(call Package/libc/Default)
  179. TITLE:=POSIX.1b RealTime extension library
  180. DEPENDS:=+libpthread
  181. endef
  182. define Package/librt/config
  183. menu "Configuration"
  184. depends on EXTERNAL_TOOLCHAIN && PACKAGE_librt
  185. config LIBRT_ROOT_DIR
  186. string
  187. prompt "librt shared library base directory"
  188. depends on EXTERNAL_TOOLCHAIN && PACKAGE_librt
  189. default TOOLCHAIN_ROOT if !NATIVE_TOOLCHAIN
  190. default "/" if NATIVE_TOOLCHAIN
  191. config LIBRT_FILE_SPEC
  192. string
  193. prompt "librt shared library files (use wildcards)"
  194. depends on EXTERNAL_TOOLCHAIN && PACKAGE_librt
  195. default "./lib/librt{-*.so,.so.*}"
  196. endmenu
  197. endef
  198. define Package/libgfortran
  199. $(call Package/gcc/Default)
  200. TITLE:=GFortran support library
  201. DEPENDS+=@INSTALL_GFORTRAN
  202. endef
  203. define Package/libgfortran/config
  204. menu "Configuration"
  205. depends on EXTERNAL_TOOLCHAIN && PACKAGE_libgfortran
  206. config LIBGFORTRAN_ROOT_DIR
  207. string
  208. prompt "libgfortran shared library base directory"
  209. depends on EXTERNAL_TOOLCHAIN && PACKAGE_libgfortran
  210. default TOOLCHAIN_ROOT if !NATIVE_TOOLCHAIN
  211. default "/" if NATIVE_TOOLCHAIN
  212. config LIBGFORTRAN_FILE_SPEC
  213. string
  214. prompt "libgfortran shared library files (use wildcards)"
  215. depends on EXTERNAL_TOOLCHAIN && PACKAGE_libgfortran
  216. default "./usr/lib/libgfortran.so.*"
  217. endmenu
  218. endef
  219. define Package/ldd
  220. $(call Package/libc/Default)
  221. DEPENDS:=@!USE_MUSL
  222. SECTION:=utils
  223. CATEGORY:=Utilities
  224. TITLE:=LDD trace utility
  225. endef
  226. define Package/ldd/config
  227. menu "Configuration"
  228. depends on EXTERNAL_TOOLCHAIN && PACKAGE_ldd
  229. config LDD_ROOT_DIR
  230. string
  231. prompt "ldd trace utility base directory"
  232. depends on EXTERNAL_TOOLCHAIN && PACKAGE_ldd
  233. default TOOLCHAIN_ROOT if !NATIVE_TOOLCHAIN
  234. default "/" if NATIVE_TOOLCHAIN
  235. config LDD_FILE_SPEC
  236. string
  237. prompt "ldd trace utility file"
  238. depends on EXTERNAL_TOOLCHAIN && PACKAGE_ldd
  239. default "./usr/bin/ldd"
  240. endmenu
  241. endef
  242. define Package/ldconfig
  243. $(call Package/libc/Default)
  244. DEPENDS:=@!USE_MUSL
  245. SECTION:=utils
  246. CATEGORY:=Utilities
  247. TITLE:=Shared library path configuration
  248. endef
  249. define Package/ldconfig/config
  250. menu "Configuration"
  251. depends on EXTERNAL_TOOLCHAIN && PACKAGE_ldconfig
  252. config LDCONFIG_ROOT_DIR
  253. string
  254. prompt "ldconfig base directory"
  255. depends on EXTERNAL_TOOLCHAIN && PACKAGE_ldconfig
  256. default TOOLCHAIN_ROOT if !NATIVE_TOOLCHAIN
  257. default "/" if NATIVE_TOOLCHAIN
  258. config LDCONFIG_FILE_SPEC
  259. string
  260. prompt "ldconfig file"
  261. depends on EXTERNAL_TOOLCHAIN && PACKAGE_ldconfig
  262. default "./sbin/ldconfig"
  263. endmenu
  264. endef
  265. define Build/Prepare
  266. mkdir -p $(PKG_BUILD_DIR)
  267. endef
  268. LIBGCC_A=$(lastword $(wildcard $(TOOLCHAIN_DIR)/lib/gcc/*/*/libgcc_pic.a))
  269. LIBGCC_MAP=$(lastword $(wildcard $(TOOLCHAIN_DIR)/lib/gcc/*/*/libgcc.map))
  270. LIBGCC_SO=$(lastword $(wildcard $(TOOLCHAIN_DIR)/lib/libgcc_s.so.*))
  271. define Build/Compile/uClibc
  272. $(CP) \
  273. $(TOOLCHAIN_DIR)/lib/libuClibc-*.so \
  274. $(TOOLCHAIN_DIR)/lib/libcrypt-*.so \
  275. $(TOOLCHAIN_DIR)/lib/libm-*.so \
  276. $(TOOLCHAIN_DIR)/lib/libpthread-*.so \
  277. $(PKG_BUILD_DIR)/
  278. endef
  279. ifneq ($(LIBGCC_SO),)
  280. define Build/Compile/libgcc
  281. $(CP) $(LIBGCC_SO) $(PKG_BUILD_DIR)/
  282. endef
  283. endif
  284. define Build/Compile/Default
  285. $(call Build/Compile/libgcc)
  286. $(call Build/Compile/$(LIBC))
  287. endef
  288. Build/Compile = $(Build/Compile/Default)
  289. ifeq ($(CONFIG_EXTERNAL_TOOLCHAIN),)
  290. define Package/libgcc/install
  291. $(INSTALL_DIR) $(1)/lib
  292. $(CP) $(TOOLCHAIN_DIR)/lib/libgcc_s.so.* $(1)/lib/
  293. endef
  294. define Package/libatomic/install
  295. $(INSTALL_DIR) $(1)/lib
  296. $(CP) $(TOOLCHAIN_DIR)/lib/libatomic.so.* $(1)/lib/
  297. endef
  298. define Package/libgfortran/install
  299. $(INSTALL_DIR) $(1)/usr/lib
  300. $(CP) $(TOOLCHAIN_DIR)/lib/libgfortran.so.* $(1)/usr/lib/
  301. endef
  302. define Package/libssp/install
  303. $(INSTALL_DIR) $(1)/lib
  304. $(CP) $(TOOLCHAIN_DIR)/lib/libssp.so.* $(1)/lib/
  305. endef
  306. define Package/libstdcpp/install
  307. $(INSTALL_DIR) $(1)/usr/lib
  308. $(CP) $(TOOLCHAIN_DIR)/lib/libstdc++.so.* $(1)/usr/lib/
  309. endef
  310. define Package/glibc/install
  311. $(CP) ./glibc-files/* $(1)/
  312. rm -f $(1)/etc/localtime
  313. $(LN) /tmp/localtime $(1)/etc/localtime
  314. $(INSTALL_DIR) $(1)/lib
  315. $(CP) \
  316. $(TOOLCHAIN_DIR)/lib/ld*.so.* \
  317. $(TOOLCHAIN_DIR)/lib/ld-$(LIBC_SO_VERSION).so \
  318. $(1)/lib/
  319. for file in libanl libc libcidn libcrypt libdl libm libnsl libnss_dns libnss_files libresolv libutil; do \
  320. for file in $(TOOLCHAIN_DIR)/lib/$$$$file.so.* $(TOOLCHAIN_DIR)/lib/$$$$file-$(LIBC_SO_VERSION).so; do \
  321. if [ -e "$$$$file" ]; then \
  322. $(CP) $$$$file $(1)/lib/; \
  323. fi; \
  324. done; \
  325. done
  326. endef
  327. define Package/uClibc/install
  328. $(INSTALL_DIR) $(1)/lib
  329. $(CP) \
  330. $(TOOLCHAIN_DIR)/lib/ld*-uClibc.so.* \
  331. $(TOOLCHAIN_DIR)/lib/ld*-uClibc-$(LIBC_SO_VERSION).so \
  332. $(1)/lib/
  333. $(CP) \
  334. $(TOOLCHAIN_DIR)/lib/libc.so.* \
  335. $(TOOLCHAIN_DIR)/lib/libuClibc-$(LIBC_SO_VERSION).so \
  336. $(1)/lib/
  337. for file in libcrypt libdl libm libutil; do \
  338. $(CP) \
  339. $(TOOLCHAIN_DIR)/lib/$$$$file.so.* \
  340. $(TOOLCHAIN_DIR)/lib/$$$$file-$(LIBC_SO_VERSION).so \
  341. $(1)/lib/; \
  342. done
  343. $(CP) \
  344. $(PKG_BUILD_DIR)/libuClibc-* \
  345. $(PKG_BUILD_DIR)/libm-* \
  346. $(PKG_BUILD_DIR)/libcrypt-* \
  347. $(1)/lib/
  348. endef
  349. LD_MUSL_NAME = $(notdir $(firstword $(wildcard $(TOOLCHAIN_DIR)/lib/libc.so*)))
  350. define Package/musl/install
  351. $(INSTALL_DIR) $(1)/lib $(1)/usr/bin
  352. $(CP) \
  353. $(TOOLCHAIN_DIR)/lib/ld-musl-*.so* \
  354. $(1)/lib/
  355. $(CP) \
  356. $(TOOLCHAIN_DIR)/lib/libc.so* \
  357. $(1)/lib/
  358. $(LN) ../../lib/$(LD_MUSL_NAME) $(1)/usr/bin/ldd
  359. endef
  360. define Package/libc/install
  361. $(call Package/$(LIBC)/install,$1)
  362. endef
  363. define Package/libc/install_lib
  364. $(CP) $(filter-out %/libdl_pic.a %/libpthread_pic.a %/libresolv_pic.a,$(wildcard $(TOOLCHAIN_DIR)/lib/lib*.a)) $(1)/lib/
  365. $(if $(wildcard $(TOOLCHAIN_DIR)/lib/libc_so.a),$(CP) $(TOOLCHAIN_DIR)/lib/libc_so.a $(1)/lib/libc_pic.a)
  366. $(if $(LIBGCC_MAP), \
  367. $(CP) $(LIBGCC_A) $(1)/lib/libgcc_s_pic.a; \
  368. $(CP) $(LIBGCC_MAP) $(1)/lib/libgcc_s_pic.map \
  369. )
  370. endef
  371. define Package/libpthread/install
  372. $(INSTALL_DIR) $(1)/lib
  373. ifneq ($(CONFIG_USE_MUSL),y)
  374. $(CP) \
  375. $(TOOLCHAIN_DIR)/lib/libpthread.so.* \
  376. $(TOOLCHAIN_DIR)/lib/libpthread-$(LIBC_SO_VERSION).so \
  377. $(1)/lib/
  378. endif
  379. endef
  380. define Package/libthread-db/install
  381. $(INSTALL_DIR) $(1)/lib
  382. $(CP) \
  383. $(TOOLCHAIN_DIR)/lib/libthread_db.so.* $(1)/lib
  384. ifeq ($(CONFIG_USE_UCLIBC),y)
  385. $(CP) \
  386. $(TOOLCHAIN_DIR)/lib/libthread_db-$(LIBC_SO_VERSION).so \
  387. $(1)/lib/
  388. endif
  389. endef
  390. define Package/libpthread/install_lib
  391. $(if $(wildcard $(TOOLCHAIN_DIR)/lib/libpthread_so.a),$(CP) $(TOOLCHAIN_DIR)/lib/libpthread_so.a $(1)/lib/libpthread_pic.a)
  392. endef
  393. define Package/librt/install
  394. $(INSTALL_DIR) $(1)/lib
  395. ifneq ($(CONFIG_USE_MUSL),y)
  396. $(CP) \
  397. $(TOOLCHAIN_DIR)/lib/librt.so.* \
  398. $(TOOLCHAIN_DIR)/lib/librt-$(LIBC_SO_VERSION).so \
  399. $(1)/lib/
  400. endif
  401. endef
  402. define Package/ldd/install
  403. $(INSTALL_DIR) $(1)/usr/bin/
  404. $(CP) $(TOOLCHAIN_DIR)/bin/ldd $(1)/usr/bin/
  405. endef
  406. define Package/ldconfig/install
  407. $(INSTALL_DIR) $(1)/sbin/
  408. $(CP) $(TOOLCHAIN_DIR)/sbin/ldconfig $(1)/sbin/
  409. endef
  410. else
  411. define Package/libgcc/install
  412. for file in $(call qstrip,$(CONFIG_LIBGCC_FILE_SPEC)); do \
  413. $(INSTALL_DIR) $(1)/lib ; \
  414. $(CP) $(call qstrip,$(CONFIG_LIBGCC_ROOT_DIR))/$$$$file $(1)/lib/ ; \
  415. done ; \
  416. exit 0
  417. endef
  418. define Package/libgfortran/install
  419. for file in $(call qstrip,$(CONFIG_LIBGFORTRAN_FILE_SPEC)); do \
  420. $(INSTALL_DIR) $(1)/lib ; \
  421. $(CP) $(call qstrip,$(CONFIG_LIBGFORTRAN_ROOT_DIR))/$$$$file $(1)/lib/ ; \
  422. done
  423. endef
  424. define Package/libssp/install
  425. for file in $(call qstrip,$(CONFIG_LIBSSP_FILE_SPEC)); do \
  426. $(INSTALL_DIR) $(1)/lib ; \
  427. $(CP) $(call qstrip,$(CONFIG_LIBSSP_ROOT_DIR))/$$$$file $(1)/lib/ ; \
  428. done ; \
  429. exit 0
  430. endef
  431. define Package/libstdcpp/install
  432. for file in $(call qstrip,$(CONFIG_LIBSTDCPP_FILE_SPEC)); do \
  433. $(INSTALL_DIR) $(1)/lib ; \
  434. $(CP) $(call qstrip,$(CONFIG_LIBSTDCPP_ROOT_DIR))/$$$$file $(1)/lib/ ; \
  435. done ; \
  436. exit 0
  437. endef
  438. define Package/libc/install
  439. for file in $(call qstrip,$(CONFIG_LIBC_FILE_SPEC)); do \
  440. $(INSTALL_DIR) $(1)/lib ; \
  441. $(CP) $(call qstrip,$(CONFIG_LIBC_ROOT_DIR))/$$$$file $(1)/lib/ ; \
  442. done ; \
  443. exit 0
  444. endef
  445. define Package/libpthread/install
  446. for file in $(call qstrip,$(CONFIG_LIBPTHREAD_FILE_SPEC)); do \
  447. $(INSTALL_DIR) $(1)/lib ; \
  448. $(CP) $(call qstrip,$(CONFIG_LIBPTHREAD_ROOT_DIR))/$$$$file $(1)/lib/ ; \
  449. done ; \
  450. exit 0
  451. endef
  452. define Package/libthread-db/install
  453. for file in $(call qstrip,$(CONFIG_LIBTHREAD_DB_FILE_SPEC)); do \
  454. $(INSTALL_DIR) $(1)/lib ; \
  455. $(CP) $(call qstrip,$(CONFIG_LIBTHREAD_DB_ROOT_DIR))/$$$$file $(1)/lib/ ; \
  456. done ; \
  457. exit 0
  458. endef
  459. define Package/librt/install
  460. for file in $(call qstrip,$(CONFIG_LIBRT_FILE_SPEC)); do \
  461. $(INSTALL_DIR) $(1)/lib ; \
  462. $(CP) $(call qstrip,$(CONFIG_LIBRT_ROOT_DIR))/$$$$file $(1)/lib/ ; \
  463. done ; \
  464. exit 0
  465. endef
  466. define Package/libatomic/install
  467. for file in $(call qstrip,$(CONFIG_LIBATOMIC_FILE_SPEC)); do \
  468. $(INSTALL_DIR) $(1)/lib ; \
  469. $(CP) $(call qstrip,$(CONFIG_LIBATOMIC_ROOT_DIR))/$$$$file $(1)/lib/ ; \
  470. done ; \
  471. exit 0
  472. endef
  473. define Package/ldd/install
  474. for file in $(call qstrip,$(CONFIG_LDD_FILE_SPEC)); do \
  475. dir=`dirname $$$$file` ; \
  476. $(INSTALL_DIR) $(1)/$$$$dir ; \
  477. $(CP) $(call qstrip,$(CONFIG_LDD_ROOT_DIR))/$$$$file $(1)/$$$$dir/ ; \
  478. done ; \
  479. exit 0
  480. endef
  481. define Package/ldconfig/install
  482. for file in $(call qstrip,$(CONFIG_LDCONFIG_FILE_SPEC)); do \
  483. dir=`dirname $$$$file` ; \
  484. $(INSTALL_DIR) $(1)/$$$$dir ; \
  485. $(CP) $(call qstrip,$(CONFIG_LDCONFIG_ROOT_DIR))/$$$$file $(1)/$$$$dir/ ; \
  486. done ; \
  487. exit 0
  488. endef
  489. endif
  490. $(eval $(call BuildPackage,libc))
  491. $(eval $(call BuildPackage,libgcc))
  492. $(eval $(call BuildPackage,libatomic))
  493. $(eval $(call BuildPackage,libssp))
  494. $(eval $(call BuildPackage,libstdcpp))
  495. $(eval $(call BuildPackage,libpthread))
  496. $(eval $(call BuildPackage,libthread-db))
  497. $(eval $(call BuildPackage,librt))
  498. $(eval $(call BuildPackage,libgfortran))
  499. $(eval $(call BuildPackage,ldd))
  500. $(eval $(call BuildPackage,ldconfig))