Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
abuild
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
25
Issues
25
List
Boards
Labels
Service Desk
Milestones
Merge Requests
16
Merge Requests
16
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
alpine
abuild
Commits
9f81a144
Commit
9f81a144
authored
Sep 04, 2013
by
Natanael Copa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
abuild: set CTARGET_ARCH and CTARGET_LIBC
For better crosscompile support
parent
b9305bad
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
17 deletions
+23
-17
abuild.in
abuild.in
+23
-17
No files found.
abuild.in
View file @
9f81a144
...
...
@@ -1813,6 +1813,25 @@ snapshot() {
fi
}
hostspec_to_arch
()
{
case
"
$1
"
in
arm
*
-
*
-
*
-
*
eabi
)
echo
"armel"
;;
arm
*
-
*
-
*
-
*
eabihf
)
echo
"armhf"
;;
i[0-9]86-
*
-
*
-
*
)
echo
"x86"
;;
x86_64-
*
-
*
-
*
)
echo
"x86_64"
;;
*
)
echo
"unknown"
;;
esac
}
hostspec_to_libc
()
{
case
"
$1
"
in
*
-
*
-
*
-uclibc
*
)
echo
"uclibc"
;;
*
-
*
-
*
-musl
*
)
echo
"musl"
;;
*
-
*
-
*
-gnu
*
)
echo
"eglibc"
;;
*
)
echo
"uclibc"
;;
esac
}
usage
()
{
echo
"
$program
$abuild_ver
"
echo
"usage:
$program
[options] [-i PKG] [-P REPODEST] [-p PKGDEST]"
...
...
@@ -1907,25 +1926,12 @@ repo=${repo##*/}
SRCDEST
=
${
SRCDEST
:-
$startdir
}
PKGDEST
=
${
PKGDEST
:-
$startdir
}
if
[
-z
"
$CARCH
"
]
;
then
case
"
$CHOST
"
in
arm
*
-
*
-
*
-
*
)
CARCH
=
"armel"
;;
i[0-9]86-
*
-
*
-
*
)
CARCH
=
"x86"
;;
x86_64-
*
-
*
-
*
)
CARCH
=
"x86_64"
;;
esac
fi
if
[
-z
"
$CLIBC
"
]
;
then
case
"
$CHOST
"
in
*
-
*
-
*
-uclibc
*
)
CLIBC
=
"uclibc"
;;
*
-
*
-
*
-musl
*
)
CLIBC
=
"musl"
;;
*
-
*
-
*
-gnu
*
)
CLIBC
=
"eglibc"
;;
*
)
CLIBC
=
"uclibc"
;;
esac
fi
[
-z
"
$CBUILD
"
]
&&
CBUILD
=
"
$CHOST
"
[
-z
"
$CTARGET
"
]
&&
CTARGET
=
"
$CHOST
"
[
-z
"
$CARCH
"
]
&&
CARCH
=
"
$(
hostspec_to_arch
$CHOST
)
"
[
-z
"
$CLIBC
"
]
&&
CLIBC
=
"
$(
hostspec_to_libc
$CHOST
)
"
[
-z
"
$CTARGET_ARCH
"
]
&&
CTARGET_ARCH
=
"
$(
hostspec_to_arch
$CTARGET
)
"
[
-z
"
$CTARGET_LIBC
"
]
&&
CTARGET_LIBC
=
"
$(
hostspec_to_libc
$CTARGET
)
"
# set a default CC
:
${
CC
:
=gcc
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment