Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
L
lede-mikrotik
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Johannes Rudolph
lede-mikrotik
Commits
989c7384
Commit
989c7384
authored
13 years ago
by
Jo-Philipp Wich
Browse files
Options
Downloads
Patches
Plain Diff
ext-toolchain.sh: properly handle toolchains without sysroot support
SVN-Revision: 29772
parent
25630dd5
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
scripts/ext-toolchain.sh
+6
-9
6 additions, 9 deletions
scripts/ext-toolchain.sh
with
6 additions
and
9 deletions
scripts/ext-toolchain.sh
+
6
−
9
View file @
989c7384
...
@@ -89,9 +89,9 @@ test_softfloat() {
...
@@ -89,9 +89,9 @@ test_softfloat() {
test_uclibc
()
{
test_uclibc
()
{
local
sysroot
=
"
$(
"
$CC
"
$CFLAGS
-print-sysroot
2>/dev/null
)
"
local
sysroot
=
"
$(
"
$CC
"
$CFLAGS
-print-sysroot
2>/dev/null
)
"
if
[
-d
"
$sysroot
"
]
;
then
if
[
-d
"
$
{
sysroot
:-
$TOOLCHAIN
}
"
]
;
then
local
lib
local
lib
for
lib
in
"
$sysroot
"
/
{
lib,usr/lib,usr/local/lib
}
/ld-uClibc
*
.so
*
;
do
for
lib
in
"
$
{
sysroot
:-
$TOOLCHAIN
}
"
/
{
lib,usr/lib,usr/local/lib
}
/ld-uClibc
*
.so
*
;
do
if
[
-f
"
$lib
"
]
&&
[
!
-h
"
$lib
"
]
;
then
if
[
-f
"
$lib
"
]
&&
[
!
-h
"
$lib
"
]
;
then
return
0
return
0
fi
fi
...
@@ -124,7 +124,7 @@ test_feature() {
...
@@ -124,7 +124,7 @@ test_feature() {
local
inc
local
inc
local
sysroot
=
"
$(
"
$CC
"
"
$@
"
-muclibc
-print-sysroot
2>/dev/null
)
"
local
sysroot
=
"
$(
"
$CC
"
"
$@
"
-muclibc
-print-sysroot
2>/dev/null
)
"
for
inc
in
"include"
"usr/include"
"usr/local/include"
;
do
for
inc
in
"include"
"usr/include"
"usr/local/include"
;
do
local
conf
=
"
$sysroot
/
$inc
/bits/uClibc_config.h"
local
conf
=
"
$
{
sysroot
:-
$TOOLCHAIN
}
/
$inc
/bits/uClibc_config.h"
if
[
-f
"
$conf
"
]
;
then
if
[
-f
"
$conf
"
]
;
then
case
"
$feature
"
in
case
"
$feature
"
in
lfs
)
grep
-q
'__UCLIBC_HAS_LFS__ 1'
"
$conf
"
;
return
$?
;;
lfs
)
grep
-q
'__UCLIBC_HAS_LFS__ 1'
"
$conf
"
;
return
$?
;;
...
@@ -174,12 +174,9 @@ find_bins() {
...
@@ -174,12 +174,9 @@ find_bins() {
local
bindir bindirs
local
bindir bindirs
for
bindir
in
$(
for
bindir
in
$(
echo
"
$sysroot
/bin"
;
echo
"
${
sysroot
:-
$TOOLCHAIN
}
/bin"
;
echo
"
$sysroot
/usr/bin"
;
echo
"
${
sysroot
:-
$TOOLCHAIN
}
/usr/bin"
;
echo
"
$sysroot
/usr/local/bin"
;
echo
"
${
sysroot
:-
$TOOLCHAIN
}
/usr/local/bin"
;
echo
"
$TOOLCHAIN
/bin"
;
echo
"
$TOOLCHAIN
/usr/bin"
;
echo
"
$TOOLCHAIN
/usr/local/bin"
;
"
$CPP
"
$CFLAGS
-v
-x
c /dev/null 2>&1 |
\
"
$CPP
"
$CFLAGS
-v
-x
c /dev/null 2>&1 |
\
sed
-ne
's#:# #g; s#^COMPILER_PATH=##p'
sed
-ne
's#:# #g; s#^COMPILER_PATH=##p'
)
;
do
)
;
do
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment