Commit Graph

41 Commits

Author SHA1 Message Date
Natanael Copa
c39a988c1b functions: set sharedir properly
fixes loading of default.conf

(applied from aports)

closes #10108
2023-05-24 02:11:12 +02:00
Natanael Copa
a1b672cad2 functions: read default configs from /usr/share/abuild/default.conf
This makes it easier to push default config updates with apk
2023-04-18 13:26:49 +02:00
Noel Kuntze
6cef1a2150 functions.sh.in: Export original CC, CXX, CPPFLAGS, CXXFLAGS, CFLAGS, LDFLAGS in BUILDCC, BUILDCXX, BUILDLD, BUILDCPPFLAGS, BUILDCXXFLAGS, BUILDCFLAGS, BUILDLDFLAGS Default CC to gcc, CXX to g++, LD to ld 2022-08-30 10:38:38 +02:00
Natanael Copa
9d5b268aec functions: hide error on missing git remote origin 2022-06-22 16:13:07 +02:00
Natanael Copa
b9739f2c3f functions.sh: make it possible to set git binary
to help with testing
2022-06-22 16:13:07 +02:00
Natanael Copa
4d3c8c8533 functions.sh: send error message to stderr 2022-06-14 16:38:40 +02:00
Ariadne Conill
78e36813d1 functions: add hostspecs for loongarch
Alpine itself will most likely use only the loongarch64 target, but it
makes sense to reserve the others as well.
2021-10-11 18:45:50 +00:00
Ariadne Conill
51c03644ba functions: add hostspecs for riscv32/riscv64 2020-05-28 13:12:22 -06:00
Timo Teräs
c9d3df08b3 functions.sh: exclusively use apk --print-arch to detect build arch
Originally "gcc -dumpmachine" was used to detect build gcc triplet.
However, abuild does not depend on gcc or build-base (but installs
it if needed to build) so gcc might not be there. Additionally
abuild-sign can be used standalone, and does not have gcc dependency.

Using ${CC:-gcc} is problematic in cross-compile, as CC might be
already set for the cross-compiler and would result giving the target
host triplet.

It was deemed simplest to use "apk --print-arch" exclusively to detect
the builder host type, or specify CBUILD manually. If there is need
to use abuild/abuild-sign on non-Alpine hosts withou apk, we can
later add fallback that uses "uname -m" to detect the architecture
and guess Alpine CBUILD from it.

Fixes #9974
Fixes: 5adf47c1 "functions.sh: use apk --print-arch for CARCH if gcc is missing"
Fixes: 95cd15c0 "functions.sh: dont die if gcc is missing"
2020-02-07 23:14:23 +02:00
Natanael Copa
5adf47c168 functions.sh: use apk --print-arch for CARCH if gcc is missing 2020-01-31 09:47:44 +00:00
Natanael Copa
95cd15c025 functions.sh: dont die if gcc is missing
abuild-sign does not use gcc.

fixes #9974
2019-11-07 16:02:47 +00:00
Joseph Benden
b1b47140ea feat: add support for ccache
This introduces basic support for ccache, during packaging builds.

If you are building many packages, it is recommended to manually
increase the maximum size of the ccache cache. This is typically
achieved by modifying `~/.ccache/ccache.conf` and adjusting the
`max_size` setting.

Signed-off-by: Joseph Benden <joe@benden.us>
2019-09-30 12:08:17 +00:00
Pete Dietl
7a8b3a8e7d Allow for git remote url to end in aports.git, (i.e., allow SSH git remotes) 2019-09-30 10:35:01 +00:00
Luca Weiss
915c7d868b functions: adjust armhf triplet
From what I could find, it was changed to -musleabihf during the Alpine
3.6 release cycle but this function was never updated to reflect that
2019-04-29 18:19:25 +00:00
Carlo Landmeter
0a79fc62c9 Allow forcing of colored output
In some cases (ie drone ci) there is no tty available but its still
possible to display colors in the webui.
2019-02-25 23:10:16 +00:00
Nils Andreas Svee
55cef04cf9 abuild: add triplet definitions for mips architectures 2017-12-11 09:04:46 +02:00
Timo Teräs
035a68ab11 functions.sh: add armel triplet 2017-06-01 10:55:30 +00:00
Andrej
033349d31c Fix false set -e termination
`readconfig()` would return the result of `[ -z "$CBUILDROOT" ]` condition (line 123) and trigger shell termination in abuild.
This also fixes building packages with a different $CTARGET and therefore cross-compile tools.
2017-04-27 06:34:44 +00:00
Natanael Copa
9c1595dc42 functions: fix abuild -A
fix so abuild -A does not exit with error if gitbase fails

this was introduced with the set -e
2017-03-20 16:13:07 +00:00
Timo Teräs
9be173c677 functions.sh: set host compiler when cross-compiling
We chose to use kernel style HOST* instead of the gcc's
*_FOR_HOST.
2017-02-24 10:20:21 +02:00
William Pitcock
a7f9bff0f7 functions: fix cross-compile triplet for armhf architecture 2017-02-14 05:52:54 +00:00
William Pitcock
ac5dbfca7f abuild: add missing triplet definitions for ppc and ppc64 architectures 2017-01-24 01:20:34 +00:00
Breno Leitao
7301f84f26 abuild: Add support for ppc64le
This is the initial patches that starts to add support for the ppc64le
platform.
2017-01-17 09:39:43 +02:00
Timo Teräs
d13decf47b functions: add s390x triplet and arch 2016-08-01 14:28:44 +03:00
Timo Teräs
f459607da7 abuild: use proper strip for each subpkg according to it's arch 2016-08-01 14:28:44 +03:00
Timo Teräs
26ec31c6c2 abuild: improve cross compiling support 2016-08-01 14:28:44 +03:00
Timo Teräs
42738f43d4 default to host gcc's machine for CBUILD 2016-07-23 06:20:00 +00:00
Timo Teräs
580dd46c58 add aarch64 architecture 2016-07-08 09:56:14 +03:00
Timo Teräs
680355db33 add armv7 build target 2015-11-12 09:20:43 +02:00
Natanael Copa
72f5a04b7f functions: rename eglibc to glibc and use 'unknown' for unknown libc 2014-06-20 08:38:03 +00:00
Natanael Copa
e65307d6d1 functions: only enable colors on terminals
We dont want wolors enabled when output is a file or a pipe
2014-04-30 13:53:17 +00:00
Natanael Copa
ad9db219b8 fix permissions 2014-03-31 11:49:48 +00:00
Natanael Copa
1822f3f624 functions: rename prog to program 2013-10-25 07:24:46 +00:00
Natanael Copa
0c02afc694 abuild: move various functions to the shared functions.sh
specifically, every script that reads/parses ./APKBUILD needs to set
CARCH.
2013-10-25 07:18:11 +00:00
Natanael Copa
2ef7ed908c functions: msg should always return success
Otherwise abuild-sign will end with error
2013-07-09 11:14:29 +00:00
Dubiousjim
0f5feef3c2 functions: also honor .abuild file at gitbase
This permits introducing branch-specific modifications to abuild.conf settings.
Any settings there override /etc/abuild.conf and $HOME/.abuild/abuild.conf.
2013-07-09 07:14:33 +00:00
Dubiousjim
cfa6c7d67a various: fancier readconfig, permit env overrides 2013-07-09 07:13:46 +00:00
Dubiousjim
89afa41792 apkgrel, functions: refactor calculation of APKBUILD's path 2013-07-09 07:13:13 +00:00
Dubiousjim
b2d6b47be1 various: s/echo/msg/, s/echo/error/, tweak error messages 2013-07-09 07:12:56 +00:00
Dubiousjim
78b22a0f78 abump, functions: refactor (and verify) calculation of APKBUILD path 2013-07-09 07:09:05 +00:00
Dubiousjim
db1314ac55 various: move conf-loading and i/o to functions 2013-07-09 06:44:01 +00:00