summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2013-04-07 14:40:58 (EDT)
committer P. J. McDermott <pjm@nac.net>2013-04-07 14:40:58 (EDT)
commit59b0b82c3d1aba45877afb1efadf34b656425c3b (patch)
tree823801416537b35471236b389948fcad5556da79 /build
parent497b8d16dba55b5bbf7d5ba8b12c95dce0058896 (diff)
build: Add configure and build targets.
Diffstat (limited to 'build')
-rwxr-xr-xbuild44
1 files changed, 44 insertions, 0 deletions
diff --git a/build b/build
index a1626e4..84898e7 100755
--- a/build
+++ b/build
@@ -1,8 +1,52 @@
#!/usr/bin/make -f
+BASE_VERSION = $$(printf '%s\n' '$(OPK_SOURCE)' | sed 's/^gcc-//')
+
+COMMON_OPTS = \
+ --with-pkgversion='GCC for ProteanOS' \
+ --program-suffix="-$(BASE_VERSION)" \
+ --enable-linker-build-id \
+ --with-system-zlib \
+ --disable-multilib \
+ --without-included-gettext \
+ --with-nls \
+ --with-sysroot="$${OPK_SYSROOT:-/}" \
+ --enable-clocale=gnu
+
+FULL_OPTS = \
+ $(COMMON_OPTS) \
+ --enable-shared \
+ --enable-threads=posix \
+ --enable-languages=c,c++
+
+BOOTSTRAP1_OPTS = \
+ $(COMMON_OPTS) \
+ --without-headers \
+ --with-newlib \
+ --disable-shared \
+ --disable-threads \
+ --enable-languages=c,c++ \
+ --disable-libgomp \
+ --disable-libmudflap \
+ --disable-libssp
+
nop:
@:
+configure:
+ if [ 'x$(OPK_HOST_PLAT)' = 'xbootstrap1' ]; then \
+ oh-autoconfigure -B gcc-build -- \
+ $(BOOTSTRAP1_OPTS); \
+ else \
+ oh-autoconfigure -B gcc-build -- \
+ $(FULL_OPTS); \
+ fi
+ touch $@
+
+build: configure
+ oh-autobuild -B gcc-build -T bootstrap-lean -- -j $${JOBS:-1}
+ touch $@
+
# POSIX.1-2008:
# If the pathname does not begin with a '/' it shall be treated as relative to
# the current working directory of the process, not relative to the directory