mirror of https://git.wownero.com/dsc/mxe.git
gcc: use SOURCE_DIR and BUILD_DIR
This commit is contained in:
parent
d08eb146da
commit
d04f6ea96a
38
src/gcc.mk
38
src/gcc.mk
|
@ -23,8 +23,7 @@ endef
|
||||||
|
|
||||||
define $(PKG)_CONFIGURE
|
define $(PKG)_CONFIGURE
|
||||||
# configure gcc
|
# configure gcc
|
||||||
mkdir '$(1).build'
|
cd '$(BUILD_DIR)' && '$(SOURCE_DIR)/configure' \
|
||||||
cd '$(1).build' && '$(1)/configure' \
|
|
||||||
--target='$(TARGET)' \
|
--target='$(TARGET)' \
|
||||||
--build='$(BUILD)' \
|
--build='$(BUILD)' \
|
||||||
--prefix='$(PREFIX)' \
|
--prefix='$(PREFIX)' \
|
||||||
|
@ -71,47 +70,46 @@ endef
|
||||||
|
|
||||||
define $(PKG)_BUILD_mingw-w64
|
define $(PKG)_BUILD_mingw-w64
|
||||||
# install mingw-w64 headers
|
# install mingw-w64 headers
|
||||||
$(call PREPARE_PKG_SOURCE,mingw-w64,$(1))
|
$(call PREPARE_PKG_SOURCE,mingw-w64,$(BUILD_DIR))
|
||||||
mkdir '$(1).headers-build'
|
mkdir '$(BUILD_DIR).headers'
|
||||||
cd '$(1).headers-build' && '$(1)/$(mingw-w64_SUBDIR)/mingw-w64-headers/configure' \
|
cd '$(BUILD_DIR).headers' && '$(BUILD_DIR)/$(mingw-w64_SUBDIR)/mingw-w64-headers/configure' \
|
||||||
--host='$(TARGET)' \
|
--host='$(TARGET)' \
|
||||||
--prefix='$(PREFIX)/$(TARGET)' \
|
--prefix='$(PREFIX)/$(TARGET)' \
|
||||||
--enable-sdk=all \
|
--enable-sdk=all \
|
||||||
--enable-idl \
|
--enable-idl \
|
||||||
--enable-secure-api \
|
--enable-secure-api \
|
||||||
$(mingw-w64-headers_CONFIGURE_OPTS)
|
$(mingw-w64-headers_CONFIGURE_OPTS)
|
||||||
$(MAKE) -C '$(1).headers-build' install
|
$(MAKE) -C '$(BUILD_DIR).headers' install
|
||||||
|
|
||||||
# build standalone gcc
|
# build standalone gcc
|
||||||
$($(PKG)_CONFIGURE)
|
$($(PKG)_CONFIGURE)
|
||||||
$(MAKE) -C '$(1).build' -j '$(JOBS)' all-gcc
|
$(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)' all-gcc
|
||||||
$(MAKE) -C '$(1).build' -j 1 $(INSTALL_STRIP_TOOLCHAIN)-gcc
|
$(MAKE) -C '$(BUILD_DIR)' -j 1 $(INSTALL_STRIP_TOOLCHAIN)-gcc
|
||||||
|
|
||||||
# build mingw-w64-crt
|
# build mingw-w64-crt
|
||||||
mkdir '$(1).crt-build'
|
mkdir '$(BUILD_DIR).crt'
|
||||||
cd '$(1).crt-build' && '$(1)/$(mingw-w64_SUBDIR)/mingw-w64-crt/configure' \
|
cd '$(BUILD_DIR).crt' && '$(BUILD_DIR)/$(mingw-w64_SUBDIR)/mingw-w64-crt/configure' \
|
||||||
--host='$(TARGET)' \
|
--host='$(TARGET)' \
|
||||||
--prefix='$(PREFIX)/$(TARGET)' \
|
--prefix='$(PREFIX)/$(TARGET)' \
|
||||||
@gcc-crt-config-opts@
|
@gcc-crt-config-opts@
|
||||||
$(MAKE) -C '$(1).crt-build' -j '$(JOBS)' || $(MAKE) -C '$(1).crt-build' -j '$(JOBS)'
|
$(MAKE) -C '$(BUILD_DIR).crt' -j '$(JOBS)' || $(MAKE) -C '$(BUILD_DIR).crt' -j '$(JOBS)'
|
||||||
$(MAKE) -C '$(1).crt-build' -j 1 $(INSTALL_STRIP_TOOLCHAIN)
|
$(MAKE) -C '$(BUILD_DIR).crt' -j 1 $(INSTALL_STRIP_TOOLCHAIN)
|
||||||
|
|
||||||
# build posix threads
|
# build posix threads
|
||||||
mkdir '$(1).pthread-build'
|
mkdir '$(BUILD_DIR).pthreads'
|
||||||
cd '$(1).pthread-build' && '$(1)/$(mingw-w64_SUBDIR)/mingw-w64-libraries/winpthreads/configure' \
|
cd '$(BUILD_DIR).pthreads' && '$(BUILD_DIR)/$(mingw-w64_SUBDIR)/mingw-w64-libraries/winpthreads/configure' \
|
||||||
$(MXE_CONFIGURE_OPTS)
|
$(MXE_CONFIGURE_OPTS)
|
||||||
$(MAKE) -C '$(1).pthread-build' -j '$(JOBS)' || $(MAKE) -C '$(1).pthread-build' -j '$(JOBS)'
|
$(MAKE) -C '$(BUILD_DIR).pthreads' -j '$(JOBS)' || $(MAKE) -C '$(BUILD_DIR).pthreads' -j '$(JOBS)'
|
||||||
$(MAKE) -C '$(1).pthread-build' -j 1 $(INSTALL_STRIP_TOOLCHAIN)
|
$(MAKE) -C '$(BUILD_DIR).pthreads' -j 1 $(INSTALL_STRIP_TOOLCHAIN)
|
||||||
|
|
||||||
# build rest of gcc
|
# build rest of gcc
|
||||||
cd '$(1).build'
|
$(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)'
|
||||||
$(MAKE) -C '$(1).build' -j '$(JOBS)'
|
$(MAKE) -C '$(BUILD_DIR)' -j 1 $(INSTALL_STRIP_TOOLCHAIN)
|
||||||
$(MAKE) -C '$(1).build' -j 1 $(INSTALL_STRIP_TOOLCHAIN)
|
|
||||||
|
|
||||||
# shared libgcc isn't installed to version-specific locations
|
# shared libgcc isn't installed to version-specific locations
|
||||||
# so install correctly to simplify cleanup
|
# so install correctly to simplify cleanup
|
||||||
$(and $(BUILD_SHARED),
|
$(and $(BUILD_SHARED),
|
||||||
$(MAKE) -C '$(1).build/$(TARGET)/libgcc' -j 1 \
|
$(MAKE) -C '$(BUILD_DIR)/$(TARGET)/libgcc' -j 1 \
|
||||||
toolexecdir='$(PREFIX)/$(TARGET)/bin' \
|
toolexecdir='$(PREFIX)/$(TARGET)/bin' \
|
||||||
SHLIB_SLIBDIR_QUAL= \
|
SHLIB_SLIBDIR_QUAL= \
|
||||||
install-shared)
|
install-shared)
|
||||||
|
|
Loading…
Reference in New Issue