mirror of https://git.wownero.com/dsc/mxe.git
gcc: cleanup lib installation
This commit is contained in:
parent
b83d6e94ab
commit
9020e9e0e5
20
src/gcc.mk
20
src/gcc.mk
|
@ -53,11 +53,13 @@ endef
|
|||
|
||||
define $(PKG)_POST_BUILD
|
||||
# TODO: find a way to configure the installation of these correctly
|
||||
rm -f $(addprefix $(PREFIX)/$(TARGET)/bin/, c++ g++ gcc gfortran)
|
||||
-mv '$(PREFIX)/lib/gcc/$(TARGET)/lib/'* '$(PREFIX)/lib/gcc/$(TARGET)/$($(PKG)_VERSION)/'
|
||||
-mv '$(PREFIX)/lib/gcc/$(TARGET)/'*.dll '$(PREFIX)/lib/gcc/$(TARGET)/$($(PKG)_VERSION)/'
|
||||
-cp '$(PREFIX)/lib/gcc/$(TARGET)/$($(PKG)_VERSION)/'*.dll '$(PREFIX)/$(TARGET)/bin/'
|
||||
-cp '$(PREFIX)/lib/gcc/$(TARGET)/$($(PKG)_VERSION)/'*.dll.a '$(PREFIX)/$(TARGET)/lib/'
|
||||
# ignore rm failure as parallel build may have cleaned up, but
|
||||
# don't wildcard all libs so future additions will be detected
|
||||
$(and $(BUILD_SHARED),
|
||||
mv -v '$(PREFIX)/lib/gcc/$(TARGET)/$($(PKG)_VERSION)/'*.dll '$(PREFIX)/$(TARGET)/bin/gcc-$($(PKG)_VERSION)/'
|
||||
-rm -v '$(PREFIX)/lib/gcc/$(TARGET)/'libgcc_s*.dll
|
||||
-rm -v '$(PREFIX)/lib/gcc/$(TARGET)/lib/'libgcc_s*.a
|
||||
-rmdir '$(PREFIX)/lib/gcc/$(TARGET)/lib/')
|
||||
endef
|
||||
|
||||
define $(PKG)_BUILD_mingw-w64
|
||||
|
@ -97,6 +99,14 @@ define $(PKG)_BUILD_mingw-w64
|
|||
$(MAKE) -C '$(1).build' -j '$(JOBS)'
|
||||
$(MAKE) -C '$(1).build' -j 1 install
|
||||
|
||||
# shared libgcc isn't installed to version-specific locations
|
||||
# so install correctly to avoid clobbering with multiple versions
|
||||
$(and $(BUILD_SHARED),
|
||||
$(MAKE) -C '$(1).build/$(TARGET)/libgcc' -j 1 \
|
||||
toolexecdir='$(PREFIX)/$(TARGET)/bin/gcc-$($(PKG)_VERSION)' \
|
||||
SHLIB_SLIBDIR_QUAL= \
|
||||
install-shared)
|
||||
|
||||
$($(PKG)_POST_BUILD)
|
||||
endef
|
||||
|
||||
|
|
Loading…
Reference in New Issue