Skip to content

Commit

Permalink
gcc: cleanup lib installation
Browse files Browse the repository at this point in the history
  • Loading branch information
tonytheodore committed Oct 25, 2015
1 parent 9732e4d commit c96a007
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/gcc.mk
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,11 @@ define $(PKG)_POST_BUILD
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/'
-mv '$(PREFIX)/lib/gcc/$(TARGET)/$($(PKG)_VERSION)/'*.dll '$(PREFIX)/$(TARGET)/bin/'
-cp '$(PREFIX)/lib/gcc/$(TARGET)/$($(PKG)_VERSION)/'*.dll.a '$(PREFIX)/$(TARGET)/lib/'

# remove incorrectly installed libcc1
rm -f '$(PREFIX)/lib/'libcc1*
endef

define $(PKG)_BUILD_mingw-w64
Expand All @@ -78,6 +81,9 @@ define $(PKG)_BUILD_mingw-w64
# build rest of gcc
cd '$(1).build'
$(MAKE) -C '$(1).build' -j '$(JOBS)'

# cc1libdir isn't passed to subdirs so install correctly and rm later
$(MAKE) -C '$(1).build/libcc1' -j 1 install cc1libdir='$(PREFIX)/lib/gcc/$(TARGET)/$($(PKG)_VERSION)'
$(MAKE) -C '$(1).build' -j 1 install

$($(PKG)_POST_BUILD)
Expand Down

0 comments on commit c96a007

Please sign in to comment.