Makefile 14 KB

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