mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2024-12-24 06:56:40 +00:00
Switch gen-kconfig to new framework
Also: - Move companion_* to comp_* to match the kconfig symbols - Replace bootstrap with former gen-versions.sh - Fold *.in.2 into their respective first parts; this moves common options to the end - if it is undesirable, inclusion of *.in can be moved where *.in.2 used to be (but that will also move version selection after common options). - Retire addToolVersion.sh (may later replace with a more comprehensive script that tries to download the added tarballs, copy the patches and try to apply them, and create a version.desc). Signed-off-by: Alexey Neyman <stilor@att.net>
This commit is contained in:
parent
50a387afa7
commit
ff0a1a3da6
17
TODO
17
TODO
@ -1,24 +1,23 @@
|
|||||||
TBD
|
TBD
|
||||||
packages todo
|
packages todo
|
||||||
|
[X] convert gen-kconfig to use templates
|
||||||
|
[ ] some way of patching development sources - version based? or just directory with "apply-to-any-revision" patches.
|
||||||
[X] mention custom glibc addons are no longer handled (even though they never fully were, ct-ng would be unable to fetch them unless they were secretly placed into the download area)
|
[X] mention custom glibc addons are no longer handled (even though they never fully were, ct-ng would be unable to fetch them unless they were secretly placed into the download area)
|
||||||
[x] mention incompatibility of sample options
|
[x] mention incompatibility of sample options
|
||||||
[X] version-locked packages
|
[X] version-locked packages
|
||||||
[X] make glibc-ports package for glibc <2.17 (it has its own repo)
|
[X] make glibc-ports package for glibc <2.17 (it has its own repo)
|
||||||
[ ] convert gen-kconfig to use templates
|
|
||||||
[ ] new packages
|
|
||||||
[ ] config.guess
|
|
||||||
[ ] gnulib
|
|
||||||
[ ] use gnulib in m4, gettext, libiconv, libtool
|
|
||||||
[ ] autoconf-archive
|
|
||||||
[ ] use to retrieve ax_pthread.m4 (gettext?)
|
|
||||||
[ ] uclibc-locales
|
|
||||||
[ ] some way of patching development sources - version based? or just directory with "apply-to-any-revision" patches.
|
|
||||||
[x] dependencies like cloog
|
[x] dependencies like cloog
|
||||||
|
|
||||||
A (slightly) ordered set of tasks for crosstool-NG. Written in a cryptic language; contact me if you want to help with any of these :)
|
A (slightly) ordered set of tasks for crosstool-NG. Written in a cryptic language; contact me if you want to help with any of these :)
|
||||||
|
|
||||||
-- Alexey Neyman (@stilor)
|
-- Alexey Neyman (@stilor)
|
||||||
|
|
||||||
|
[ ] new packages
|
||||||
|
[ ] config.guess
|
||||||
|
[ ] gnulib
|
||||||
|
[ ] use gnulib in m4, gettext, libiconv, libtool
|
||||||
|
[ ] autoconf-archive
|
||||||
|
[ ] use to retrieve ax_pthread.m4 (gettext?)
|
||||||
[ ] retire wiki-samples
|
[ ] retire wiki-samples
|
||||||
[ ] Fix displaying the versions in case devel is used (custom location/repo) - display "devel" or "custom" in those cases
|
[ ] Fix displaying the versions in case devel is used (custom location/repo) - display "devel" or "custom" in those cases
|
||||||
[ ] clean up GDB versions - no X.Y if X.Y.1 is present
|
[ ] clean up GDB versions - no X.Y if X.Y.1 is present
|
||||||
|
651
bootstrap
651
bootstrap
@ -1,13 +1,644 @@
|
|||||||
#!/bin/sh
|
#!/bin/bash
|
||||||
set -e
|
|
||||||
|
|
||||||
printf "Running autoconf...\n"
|
########################################
|
||||||
|
# Common meta-language implementation. Syntax:
|
||||||
|
#
|
||||||
|
# The template file is processed line by line, with @@VAR@@ placeholders
|
||||||
|
# being replaced with a value of the VAR variable.
|
||||||
|
# Special lines start with '#!' and a keyword:
|
||||||
|
#
|
||||||
|
# #!//
|
||||||
|
# Comment, the rest of the line is ignored
|
||||||
|
# #!if COND
|
||||||
|
# Conditional: the lines until the matching #!end-if are processed
|
||||||
|
# only if the conditional COND evaluates to true.
|
||||||
|
# #!foreach NAME
|
||||||
|
# Iterate over NAME entities (the iterator must be set up first
|
||||||
|
# using the set_iter function), processing the lines until the matching
|
||||||
|
# #!end-foreach line.
|
||||||
|
|
||||||
|
declare -A info
|
||||||
|
|
||||||
|
debug()
|
||||||
|
{
|
||||||
|
if [ -n "${DEBUG}" ]; then
|
||||||
|
echo "DEBUG :: $@" >&2
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
msg()
|
||||||
|
{
|
||||||
|
if [ -z "${QUIET}" ]; then
|
||||||
|
echo "INFO :: $@" >&2
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
warn()
|
||||||
|
{
|
||||||
|
echo "WARN :: $@" >&2
|
||||||
|
}
|
||||||
|
|
||||||
|
error()
|
||||||
|
{
|
||||||
|
echo "ERROR :: $@" >&2
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
find_end()
|
||||||
|
{
|
||||||
|
local token="${1}"
|
||||||
|
local count=1
|
||||||
|
|
||||||
|
# Skip first line, we know it has the proper '#!' command on it
|
||||||
|
endline=$[l + 1]
|
||||||
|
while [ "${endline}" -le "${end}" ]; do
|
||||||
|
case "${tlines[${endline}]}" in
|
||||||
|
"#!${token} "*)
|
||||||
|
count=$[count + 1]
|
||||||
|
;;
|
||||||
|
"#!end-${token}")
|
||||||
|
count=$[count - 1]
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
if [ "${count}" = 0 ]; then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
endline=$[endline + 1]
|
||||||
|
done
|
||||||
|
error "line ${l}: '${token}' token is unpaired"
|
||||||
|
}
|
||||||
|
|
||||||
|
set_iter()
|
||||||
|
{
|
||||||
|
local name="${1}"
|
||||||
|
|
||||||
|
if [ "${info[iter_${name}]+set}" = "set" ]; then
|
||||||
|
error "Iterator over '${name}' is already set up"
|
||||||
|
fi
|
||||||
|
shift
|
||||||
|
debug "Setting iterator over '${name}' to '$*'"
|
||||||
|
info[iter_${name}]="$*"
|
||||||
|
}
|
||||||
|
|
||||||
|
run_if()
|
||||||
|
{
|
||||||
|
local cond="${1}"
|
||||||
|
local endline
|
||||||
|
|
||||||
|
find_end "if"
|
||||||
|
if eval "${cond}"; then
|
||||||
|
debug "True conditional '${cond}' at lines ${l}..${endline}"
|
||||||
|
run_lines $[l + 1] $[endline - 1]
|
||||||
|
else
|
||||||
|
debug "False conditional '${cond}' at lines ${l}..${endline}"
|
||||||
|
fi
|
||||||
|
lnext=$[endline + 1]
|
||||||
|
debug "Continue at line ${lnext}"
|
||||||
|
}
|
||||||
|
|
||||||
|
do_foreach()
|
||||||
|
{
|
||||||
|
local var="${1}"
|
||||||
|
local v saveinfo
|
||||||
|
|
||||||
|
shift
|
||||||
|
if [ "`type -t enter_${var}`" != "function" ]; then
|
||||||
|
error "No parameter setup routine for iterator over '${var}'"
|
||||||
|
fi
|
||||||
|
for v in ${info[iter_${var}]}; do
|
||||||
|
saveinfo=`declare -p info`
|
||||||
|
eval "enter_${var} ${v}"
|
||||||
|
eval "$@"
|
||||||
|
eval "${saveinfo#declare -A }"
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
run_foreach()
|
||||||
|
{
|
||||||
|
local var="${1}"
|
||||||
|
local endline
|
||||||
|
|
||||||
|
if [ "${info[iter_${var}]+set}" != "set" ]; then
|
||||||
|
error "line ${l}: iterator over '${var}' is not defined"
|
||||||
|
fi
|
||||||
|
find_end "foreach"
|
||||||
|
debug "Loop over '${var}', lines ${l}..${endline}"
|
||||||
|
do_foreach ${var} run_lines $[l + 1] $[endline - 1]
|
||||||
|
lnext=$[endline + 1]
|
||||||
|
debug "Continue at line ${lnext}"
|
||||||
|
}
|
||||||
|
|
||||||
|
run_lines()
|
||||||
|
{
|
||||||
|
local start="${1}"
|
||||||
|
local end="${2}"
|
||||||
|
local l lnext s s1 v
|
||||||
|
|
||||||
|
debug "Running lines ${start}..${end}"
|
||||||
|
l=${start}
|
||||||
|
while [ "${l}" -le "${end}" ]; do
|
||||||
|
lnext=$[l+1]
|
||||||
|
s="${tlines[${l}]}"
|
||||||
|
# Expand @@foo@@ to ${info[foo]}. First escape variables/backslashes for evals below.
|
||||||
|
s="${s//\\/\\\\}"
|
||||||
|
s="${s//\$/\\\$}"
|
||||||
|
s1=
|
||||||
|
while [ -n "${s}" ]; do
|
||||||
|
case "${s}" in
|
||||||
|
*@@*@@*)
|
||||||
|
v="${s#*@@}"
|
||||||
|
v="${v%%@@*}"
|
||||||
|
if [ "${info[${v}]+set}" != "set" ]; then
|
||||||
|
error "line ${l}: reference to undefined variable '${v}'"
|
||||||
|
fi
|
||||||
|
s1="${s1}${s%%@@*}\${info[${v}]}"
|
||||||
|
s="${s#*@@*@@}"
|
||||||
|
;;
|
||||||
|
*@@*)
|
||||||
|
error "line ${l}: non-paired @@ markers"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
s1="${s1}${s}"
|
||||||
|
break
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
s=${s1}
|
||||||
|
|
||||||
|
debug "Evaluate: ${s}"
|
||||||
|
case "${s}" in
|
||||||
|
"#!if "*)
|
||||||
|
run_if "${s#* }"
|
||||||
|
;;
|
||||||
|
"#!foreach "*)
|
||||||
|
run_foreach "${s#* }"
|
||||||
|
;;
|
||||||
|
"#!//"*)
|
||||||
|
# Comment, do nothing
|
||||||
|
;;
|
||||||
|
"#!"*)
|
||||||
|
error "line ${l}: unrecognized command"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
# Not a special command
|
||||||
|
eval "echo \"${s//\"/\\\"}\""
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
l=${lnext}
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
run_template()
|
||||||
|
{
|
||||||
|
local -a tlines
|
||||||
|
local src="${1}"
|
||||||
|
|
||||||
|
if [ ! -r "${src}" ]; then
|
||||||
|
error "Template '${src}' not found"
|
||||||
|
fi
|
||||||
|
debug "Running template ${src}"
|
||||||
|
mapfile -O 1 -t tlines < "${src}"
|
||||||
|
run_lines 1 ${#tlines[@]}
|
||||||
|
}
|
||||||
|
|
||||||
|
########################################
|
||||||
|
|
||||||
|
# Convert the argument to a Kconfig-style macro
|
||||||
|
kconfigize()
|
||||||
|
{
|
||||||
|
local v="${1}"
|
||||||
|
|
||||||
|
v=${v//[^0-9A-Za-z_]/_}
|
||||||
|
echo "${v^^}"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Helper for cmp_versions: compare an upstream/debian portion of
|
||||||
|
# a version. Returns 0 if equal, otherwise echoes "-1" or "1" and
|
||||||
|
# returns 1.
|
||||||
|
equal_versions()
|
||||||
|
{
|
||||||
|
local v1="${1}"
|
||||||
|
local v2="${2}"
|
||||||
|
local p1 p2
|
||||||
|
|
||||||
|
# Compare alternating non-numerical/numerical portions, until
|
||||||
|
# non-equal portion is found or either string is exhausted.
|
||||||
|
while [ -n "${v1}" -a -n "${v2}" ]; do
|
||||||
|
# Find non-numerical portions and compare lexicographically
|
||||||
|
p1="${v1%%[0-9]*}"
|
||||||
|
p2="${v2%%[0-9]*}"
|
||||||
|
v1="${v1#${p1}}"
|
||||||
|
v2="${v2#${p2}}"
|
||||||
|
#debug "lex [${p1}] v [${p2}]"
|
||||||
|
if [ "${p1}" \< "${p2}" ]; then
|
||||||
|
echo "-1"
|
||||||
|
return 1
|
||||||
|
elif [ "${p1}" \> "${p2}" ]; then
|
||||||
|
echo "1"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
#debug "rem [${v1}] v [${v2}]"
|
||||||
|
# Find numerical portions and compare numerically
|
||||||
|
p1="${v1%%[^0-9]*}"
|
||||||
|
p2="${v2%%[^0-9]*}"
|
||||||
|
v1="${v1#${p1}}"
|
||||||
|
v2="${v2#${p2}}"
|
||||||
|
#debug "num [${p1}] v [${p2}]"
|
||||||
|
if [ "${p1:-0}" -lt "${p2:-0}" ]; then
|
||||||
|
echo "-1"
|
||||||
|
return 1
|
||||||
|
elif [ "${p1:-0}" -gt "${p2:-0}" ]; then
|
||||||
|
echo "1"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
#debug "rem [${v1}] v [${v2}]"
|
||||||
|
done
|
||||||
|
if [ -n "${v1}" ]; then
|
||||||
|
echo "1"
|
||||||
|
return 1
|
||||||
|
elif [ -n "${v2}" ]; then
|
||||||
|
echo "-1"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
# Compare two version strings, similar to sort -V. But we don't
|
||||||
|
# want to depend on GNU sort availability on the host.
|
||||||
|
# See http://www.debian.org/doc/debian-policy/ch-controlfields.html
|
||||||
|
# for description of what the version is expected to be.
|
||||||
|
# Returns "-1", "0" or "1" if first version is earlier, same or
|
||||||
|
# later than the second.
|
||||||
|
cmp_versions()
|
||||||
|
{
|
||||||
|
local v1="${1}"
|
||||||
|
local v2="${2}"
|
||||||
|
local e1=0 e2=0 u1 u2 d1=0 d2=0
|
||||||
|
|
||||||
|
# Case-insensitive comparison
|
||||||
|
v1="${v1^^}"
|
||||||
|
v2="${v2^^}"
|
||||||
|
|
||||||
|
# Find if the versions contain epoch part
|
||||||
|
case "${v1}" in
|
||||||
|
*:*)
|
||||||
|
e1="${v1%%:*}"
|
||||||
|
v1="${v1#*:}"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
case "${v2}" in
|
||||||
|
*:*)
|
||||||
|
e2="${v2%%:*}"
|
||||||
|
v2="${v2#*:}"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# Compare epochs numerically
|
||||||
|
if [ "${e1}" -lt "${e2}" ]; then
|
||||||
|
echo "-1"
|
||||||
|
return
|
||||||
|
elif [ "${e1}" -gt "${e2}" ]; then
|
||||||
|
echo "1"
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Find if the version contains a "debian" part.
|
||||||
|
# v1/v2 will now contain "upstream" part.
|
||||||
|
case "${v1}" in
|
||||||
|
*-*)
|
||||||
|
d1=${v1##*-}
|
||||||
|
v1=${v1%-*}
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
case "${v2}" in
|
||||||
|
*-*)
|
||||||
|
d2=${v2##*-}
|
||||||
|
v2=${v2%-*}
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# Compare upstream
|
||||||
|
if equal_versions "${v1}" "${v2}" && equal_versions "${d1}" "${d2}"; then
|
||||||
|
echo "0"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Sort versions, descending
|
||||||
|
sort_versions()
|
||||||
|
{
|
||||||
|
local sorted
|
||||||
|
local remains="$*"
|
||||||
|
local next_remains
|
||||||
|
local v vx found
|
||||||
|
|
||||||
|
while [ -n "${remains}" ]; do
|
||||||
|
#debug "Sorting [${remains}]"
|
||||||
|
for v in ${remains}; do
|
||||||
|
found=yes
|
||||||
|
next_remains=
|
||||||
|
#debug "Candidate ${v}"
|
||||||
|
for vx in ${remains}; do
|
||||||
|
#debug "${v} vs ${vx} :: `cmp_versions ${v} ${vx}`"
|
||||||
|
case `cmp_versions ${v} ${vx}` in
|
||||||
|
1)
|
||||||
|
next_remains+=" ${vx}"
|
||||||
|
;;
|
||||||
|
0)
|
||||||
|
;;
|
||||||
|
-1)
|
||||||
|
found=no
|
||||||
|
#debug "Bad: earlier than ${vx}"
|
||||||
|
break
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
if [ "${found}" = "yes" ]; then
|
||||||
|
# $v is less than all other members in next_remains
|
||||||
|
sorted+=" ${v}"
|
||||||
|
remains="${next_remains}"
|
||||||
|
#debug "Good candidate ${v} sorted [${sorted}] remains [${remains}]"
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
done
|
||||||
|
echo "${sorted}"
|
||||||
|
}
|
||||||
|
|
||||||
|
read_file()
|
||||||
|
{
|
||||||
|
local l p
|
||||||
|
|
||||||
|
while read l; do
|
||||||
|
l="${p}${l}"
|
||||||
|
p=
|
||||||
|
case "${l}" in
|
||||||
|
"")
|
||||||
|
continue
|
||||||
|
;;
|
||||||
|
*\\)
|
||||||
|
p="${l%\\}"
|
||||||
|
continue
|
||||||
|
;;
|
||||||
|
"#"*)
|
||||||
|
continue
|
||||||
|
;;
|
||||||
|
*=*)
|
||||||
|
echo "info[${l%%=*}]=${l#*=}"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
error "syntax error in '${1}': '${l}'"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done < "${1}"
|
||||||
|
}
|
||||||
|
|
||||||
|
read_package_desc()
|
||||||
|
{
|
||||||
|
read_file "packages/${1}/package.desc"
|
||||||
|
}
|
||||||
|
|
||||||
|
read_version_desc()
|
||||||
|
{
|
||||||
|
read_file "packages/${1}/${2}/version.desc"
|
||||||
|
}
|
||||||
|
|
||||||
|
find_forks()
|
||||||
|
{
|
||||||
|
local -A info
|
||||||
|
|
||||||
|
info[preferred]=${1}
|
||||||
|
eval `read_package_desc ${1}`
|
||||||
|
|
||||||
|
if [ -n "${info[master]}" ]; then
|
||||||
|
pkg_nforks[${info[master]}]=$[pkg_nforks[${info[master]}]+1]
|
||||||
|
pkg_forks[${info[master]}]+=" ${1} "
|
||||||
|
else
|
||||||
|
pkg_preferred[${1}]=${info[preferred]}
|
||||||
|
pkg_nforks[${1}]=$[pkg_nforks[${1}]+1]
|
||||||
|
pkg_forks[${1}]+=" ${1} "
|
||||||
|
pkg_milestones[${1}]=`sort_versions ${info[milestones]}`
|
||||||
|
pkg_masters+=( "${1}" )
|
||||||
|
fi
|
||||||
|
# Keep sorting so that preferred fork is first
|
||||||
|
if [ -n "${pkg_preferred[${1}]}" ]; then
|
||||||
|
pkg_forks[${1}]="${pkg_preferred[${1}]} ${pkg_forks[${1}]##* ${pkg_preferred[${1}]} } ${pkg_forks[${1}]%% ${pkg_preferred[${1}]} *}"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
check_obsolete_experimental()
|
||||||
|
{
|
||||||
|
[ -z "${info[obsolete]}" ] && only_obsolete=
|
||||||
|
[ -z "${info[experimental]}" ] && only_experimental=
|
||||||
|
}
|
||||||
|
|
||||||
|
enter_fork()
|
||||||
|
{
|
||||||
|
local fork="${1}"
|
||||||
|
local versions
|
||||||
|
local only_obsolete only_experimental
|
||||||
|
|
||||||
|
# Set defaults
|
||||||
|
info[obsolete]=
|
||||||
|
info[experimental]=
|
||||||
|
info[repository]=
|
||||||
|
info[repository_branch]=
|
||||||
|
info[repository_cset]=
|
||||||
|
info[repository_subdir]=
|
||||||
|
info[bootstrap]=
|
||||||
|
info[fork]=${fork}
|
||||||
|
info[name]=${fork}
|
||||||
|
info[mirrors]=
|
||||||
|
info[archive_filename]='@{pkg_name}-@{version}'
|
||||||
|
info[archive_dirname]='@{pkg_name}-@{version}'
|
||||||
|
|
||||||
|
eval `read_package_desc ${fork}`
|
||||||
|
|
||||||
|
info[pfx]=`kconfigize ${fork}`
|
||||||
|
info[originpfx]=`kconfigize ${info[origin]}`
|
||||||
|
if [ -r "packages/${info[origin]}.help" ]; then
|
||||||
|
info[originhelp]=`sed 's/^/ /' "packages/${info[origin]}.help"`
|
||||||
|
else
|
||||||
|
info[originhelp]=" ${info[master]} from ${info[origin]}."
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "${info[repository]}" ]; then
|
||||||
|
info[vcs]=${info[repository]%% *}
|
||||||
|
info[repository_url]=${info[repository]#* }
|
||||||
|
fi
|
||||||
|
info[versionlocked]=`kconfigize "${info[versionlocked]}"`
|
||||||
|
|
||||||
|
versions=`cd packages/${fork} && \
|
||||||
|
for f in */version.desc; do [ -r "${f}" ] && echo "${f%/version.desc}"; done`
|
||||||
|
versions=`sort_versions ${versions}`
|
||||||
|
|
||||||
|
set_iter version ${versions}
|
||||||
|
info[all_versions]=${versions}
|
||||||
|
|
||||||
|
# If a fork does not define any versions at all ("rolling release"), do not
|
||||||
|
# consider it obsolete/experimental unless it is so marked in the fork's
|
||||||
|
# description.
|
||||||
|
if [ -n "${versions}" ]; then
|
||||||
|
only_obsolete=yes
|
||||||
|
only_experimental=yes
|
||||||
|
do_foreach version check_obsolete_experimental
|
||||||
|
info[only_obsolete]=${only_obsolete}
|
||||||
|
info[only_experimental]=${only_experimental}
|
||||||
|
else
|
||||||
|
info[only_obsolete]=${info[obsolete]}
|
||||||
|
info[only_experimental]=${info[experimental]}
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
enter_version()
|
||||||
|
{
|
||||||
|
local -A ver_postfix=( \
|
||||||
|
[,yes,,]=" (OBSOLETE)" \
|
||||||
|
[,,yes,]=" (EXPERIMENTAL)" \
|
||||||
|
[,yes,yes,]=" (OBSOLETE,EXPERIMENTAL)" )
|
||||||
|
local version="${1}"
|
||||||
|
|
||||||
|
eval `read_version_desc ${info[fork]} ${version}`
|
||||||
|
info[ver]=${version}
|
||||||
|
info[kcfg]=`kconfigize ${version}`
|
||||||
|
info[ver_postfix]=${ver_postfix[,${info[obsolete]},${info[experimental]},]}
|
||||||
|
}
|
||||||
|
|
||||||
|
enter_milestone()
|
||||||
|
{
|
||||||
|
local ms="${1}"
|
||||||
|
local cmp
|
||||||
|
|
||||||
|
info[ms]=${ms}
|
||||||
|
info[ms_kcfg]=`kconfigize ${ms}`
|
||||||
|
if [ -n "${info[ver]}" ]; then
|
||||||
|
info[version_cmp_milestone]=`cmp_versions ${info[ver]} ${info[ms]}`
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
gen_packages()
|
||||||
|
{
|
||||||
|
local -A pkg_forks pkg_milestones pkg_nforks
|
||||||
|
local -a pkg_masters pkg_all pkg_preferred
|
||||||
|
|
||||||
|
pkg_all=( `cd packages && \
|
||||||
|
ls */package.desc 2>/dev/null | \
|
||||||
|
while read f; do [ -r "${f}" ] && echo "${f%/package.desc}"; done | \
|
||||||
|
xargs echo` )
|
||||||
|
|
||||||
|
debug "Packages: ${pkg_all[@]}"
|
||||||
|
|
||||||
|
# We need to group forks of the same package into the same
|
||||||
|
# config file. Discover such relationships and only iterate
|
||||||
|
# over "master" packages at the top.
|
||||||
|
for p in "${pkg_all[@]}"; do
|
||||||
|
find_forks "${p}"
|
||||||
|
done
|
||||||
|
msg "Master packages: ${pkg_masters[@]}"
|
||||||
|
|
||||||
|
# Now for each master, create its kconfig file with version
|
||||||
|
# definitions.
|
||||||
|
for p in "${pkg_masters[@]}"; do
|
||||||
|
msg "Generating '${config_versions_dir}/${p}.in'"
|
||||||
|
exec >"${config_versions_dir}/${p}.in"
|
||||||
|
# Base definitions for the whole config file
|
||||||
|
info=( \
|
||||||
|
[master]=${p} \
|
||||||
|
[masterpfx]=`kconfigize ${p}` \
|
||||||
|
[nforks]=${pkg_nforks[${p}]} \
|
||||||
|
[all_milestones]=${pkg_milestones[${p}]} \
|
||||||
|
)
|
||||||
|
set_iter fork ${pkg_forks[${p}]}
|
||||||
|
set_iter milestone ${pkg_milestones[${p}]}
|
||||||
|
|
||||||
|
run_template "maintainer/kconfig-versions.template"
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
msg "*** Generating package version descriptions"
|
||||||
|
config_versions_dir=config/versions
|
||||||
|
rm -rf "${config_versions_dir}"
|
||||||
|
mkdir -p "${config_versions_dir}"
|
||||||
|
gen_packages
|
||||||
|
|
||||||
|
get_components()
|
||||||
|
{
|
||||||
|
local dir="${1}"
|
||||||
|
local f b
|
||||||
|
|
||||||
|
for f in ${dir}/*.in; do
|
||||||
|
b=${f#${dir}/}
|
||||||
|
echo ${b%.in}
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
enter_choice()
|
||||||
|
{
|
||||||
|
local choice="${1}"
|
||||||
|
local l
|
||||||
|
|
||||||
|
# TBD generate sourcing of versions/$component.in automatically - and add a comment that versions must
|
||||||
|
# TBD generated first? [what to do with glibc/glibc-ports]
|
||||||
|
info[choice]="${choice}"
|
||||||
|
info[has_part2]="${p2}"
|
||||||
|
|
||||||
|
# Not local, we need these arrays be set in enter_dependency/enter_help
|
||||||
|
deplines=( )
|
||||||
|
helplines=( )
|
||||||
|
while read l; do
|
||||||
|
case "${l}" in
|
||||||
|
"## help "*)
|
||||||
|
helplines+=( "${l#* help }" )
|
||||||
|
;;
|
||||||
|
"## depends "*|"## select "*)
|
||||||
|
deplines+=( "${l#* }" )
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done < "config/${info[dir]}/${choice}.in"
|
||||||
|
set_iter dependency "${!deplines[@]}"
|
||||||
|
set_iter help "${!helplines[@]}"
|
||||||
|
}
|
||||||
|
|
||||||
|
enter_dependency()
|
||||||
|
{
|
||||||
|
info[depline]="${deplines[${1}]}"
|
||||||
|
}
|
||||||
|
|
||||||
|
enter_help()
|
||||||
|
{
|
||||||
|
info[helpline]="${helplines[${1}]}"
|
||||||
|
}
|
||||||
|
|
||||||
|
gen_selection()
|
||||||
|
{
|
||||||
|
local type="${1}"
|
||||||
|
local dir="${2}"
|
||||||
|
local label="${3}"
|
||||||
|
|
||||||
|
msg "Generating ${dir}.in and ${dir}.in.2"
|
||||||
|
exec >"${config_gen_dir}/${dir}.in"
|
||||||
|
info=( \
|
||||||
|
[prefix]=`kconfigize ${dir}` \
|
||||||
|
[dir]=${dir} \
|
||||||
|
[label]="${label}" \
|
||||||
|
)
|
||||||
|
set_iter choice `get_components config/${dir}`
|
||||||
|
run_template "maintainer/kconfig-${type}.template"
|
||||||
|
}
|
||||||
|
|
||||||
|
msg "*** Generating menu/choice selections"
|
||||||
|
config_gen_dir=config/gen
|
||||||
|
rm -rf "${config_gen_dir}"
|
||||||
|
mkdir -p "${config_gen_dir}"
|
||||||
|
|
||||||
|
gen_selection choice arch "Target Architecture"
|
||||||
|
gen_selection choice kernel "Target OS"
|
||||||
|
gen_selection choice cc "Compiler"
|
||||||
|
gen_selection choice binutils "Binutils"
|
||||||
|
gen_selection choice libc "C library"
|
||||||
|
gen_selection menu debug "Debug facilities"
|
||||||
|
gen_selection menu comp_tools "Companion tools"
|
||||||
|
|
||||||
|
msg "*** Running autoconf"
|
||||||
autoconf -Wall --force
|
autoconf -Wall --force
|
||||||
|
|
||||||
printf "Generating kconfig component lists...\n"
|
msg "*** Done!"
|
||||||
./maintainer/gen-kconfig.sh
|
|
||||||
|
|
||||||
printf "Generating kconfig component versions...\n"
|
|
||||||
./maintainer/gen-versions.sh
|
|
||||||
|
|
||||||
printf "Done. You may now run:\n ./configure\n"
|
|
||||||
|
@ -5,5 +5,60 @@
|
|||||||
## select ARCH_USE_MMU
|
## select ARCH_USE_MMU
|
||||||
## select ARCH_SUPPORTS_WITH_CPU
|
## select ARCH_SUPPORTS_WITH_CPU
|
||||||
## select ARCH_SUPPORTS_WITH_TUNE
|
## select ARCH_SUPPORTS_WITH_TUNE
|
||||||
##
|
|
||||||
## help The Alpha architecture.
|
## help The Alpha architecture.
|
||||||
|
|
||||||
|
choice
|
||||||
|
bool
|
||||||
|
prompt "Variant"
|
||||||
|
|
||||||
|
config ARCH_ALPHA_EV4
|
||||||
|
bool
|
||||||
|
prompt "EV4"
|
||||||
|
|
||||||
|
config ARCH_ALPHA_EV45
|
||||||
|
bool
|
||||||
|
prompt "EV45"
|
||||||
|
|
||||||
|
config ARCH_ALPHA_EV5
|
||||||
|
bool
|
||||||
|
prompt "EV5"
|
||||||
|
|
||||||
|
config ARCH_ALPHA_EV56
|
||||||
|
bool
|
||||||
|
prompt "EV56"
|
||||||
|
|
||||||
|
config ARCH_ALPHA_EV6
|
||||||
|
bool
|
||||||
|
prompt "EV6"
|
||||||
|
|
||||||
|
config ARCH_ALPHA_EV67
|
||||||
|
bool
|
||||||
|
prompt "EV67"
|
||||||
|
|
||||||
|
endchoice
|
||||||
|
|
||||||
|
config ARCH_ALPHA_VARIANT
|
||||||
|
string
|
||||||
|
default "ev4" if ARCH_ALPHA_EV4
|
||||||
|
default "ev45" if ARCH_ALPHA_EV45
|
||||||
|
default "ev5" if ARCH_ALPHA_EV5
|
||||||
|
default "ev56" if ARCH_ALPHA_EV56
|
||||||
|
default "ev6" if ARCH_ALPHA_EV6
|
||||||
|
default "ev67" if ARCH_ALPHA_EV67
|
||||||
|
|
||||||
|
config ARCH_CPU
|
||||||
|
default "ev4" if ARCH_ALPHA_EV4
|
||||||
|
default "ev45" if ARCH_ALPHA_EV45
|
||||||
|
default "ev5" if ARCH_ALPHA_EV5
|
||||||
|
default "ev56" if ARCH_ALPHA_EV56
|
||||||
|
default "ev6" if ARCH_ALPHA_EV6
|
||||||
|
default "ev67" if ARCH_ALPHA_EV67
|
||||||
|
|
||||||
|
config ARCH_TUNE
|
||||||
|
default "ev4" if ARCH_ALPHA_EV4
|
||||||
|
default "ev45" if ARCH_ALPHA_EV45
|
||||||
|
default "ev5" if ARCH_ALPHA_EV5
|
||||||
|
default "ev56" if ARCH_ALPHA_EV56
|
||||||
|
default "ev6" if ARCH_ALPHA_EV6
|
||||||
|
default "ev67" if ARCH_ALPHA_EV67
|
||||||
|
@ -1,56 +0,0 @@
|
|||||||
# Alpha specific configuration file
|
|
||||||
|
|
||||||
choice
|
|
||||||
bool
|
|
||||||
prompt "Variant"
|
|
||||||
|
|
||||||
config ARCH_ALPHA_EV4
|
|
||||||
bool
|
|
||||||
prompt "EV4"
|
|
||||||
|
|
||||||
config ARCH_ALPHA_EV45
|
|
||||||
bool
|
|
||||||
prompt "EV45"
|
|
||||||
|
|
||||||
config ARCH_ALPHA_EV5
|
|
||||||
bool
|
|
||||||
prompt "EV5"
|
|
||||||
|
|
||||||
config ARCH_ALPHA_EV56
|
|
||||||
bool
|
|
||||||
prompt "EV56"
|
|
||||||
|
|
||||||
config ARCH_ALPHA_EV6
|
|
||||||
bool
|
|
||||||
prompt "EV6"
|
|
||||||
|
|
||||||
config ARCH_ALPHA_EV67
|
|
||||||
bool
|
|
||||||
prompt "EV67"
|
|
||||||
|
|
||||||
endchoice
|
|
||||||
|
|
||||||
config ARCH_ALPHA_VARIANT
|
|
||||||
string
|
|
||||||
default "ev4" if ARCH_ALPHA_EV4
|
|
||||||
default "ev45" if ARCH_ALPHA_EV45
|
|
||||||
default "ev5" if ARCH_ALPHA_EV5
|
|
||||||
default "ev56" if ARCH_ALPHA_EV56
|
|
||||||
default "ev6" if ARCH_ALPHA_EV6
|
|
||||||
default "ev67" if ARCH_ALPHA_EV67
|
|
||||||
|
|
||||||
config ARCH_CPU
|
|
||||||
default "ev4" if ARCH_ALPHA_EV4
|
|
||||||
default "ev45" if ARCH_ALPHA_EV45
|
|
||||||
default "ev5" if ARCH_ALPHA_EV5
|
|
||||||
default "ev56" if ARCH_ALPHA_EV56
|
|
||||||
default "ev6" if ARCH_ALPHA_EV6
|
|
||||||
default "ev67" if ARCH_ALPHA_EV67
|
|
||||||
|
|
||||||
config ARCH_TUNE
|
|
||||||
default "ev4" if ARCH_ALPHA_EV4
|
|
||||||
default "ev45" if ARCH_ALPHA_EV45
|
|
||||||
default "ev5" if ARCH_ALPHA_EV5
|
|
||||||
default "ev56" if ARCH_ALPHA_EV56
|
|
||||||
default "ev6" if ARCH_ALPHA_EV6
|
|
||||||
default "ev67" if ARCH_ALPHA_EV67
|
|
@ -14,6 +14,101 @@
|
|||||||
## select ARCH_SUPPORTS_WITH_FLOAT if ARCH_32
|
## select ARCH_SUPPORTS_WITH_FLOAT if ARCH_32
|
||||||
## select ARCH_SUPPORTS_WITH_FPU if ARCH_32
|
## select ARCH_SUPPORTS_WITH_FPU if ARCH_32
|
||||||
## select ARCH_SUPPORTS_SOFTFP if ARCH_32
|
## select ARCH_SUPPORTS_SOFTFP if ARCH_32
|
||||||
##
|
|
||||||
## help The ARM architecture, as defined by:
|
## help The ARM architecture, as defined by:
|
||||||
## help http://www.arm.com/
|
## help http://www.arm.com/
|
||||||
|
|
||||||
|
if ARCH_32
|
||||||
|
config ARCH_ARM_MODE
|
||||||
|
string
|
||||||
|
default "arm" if ARCH_ARM_MODE_ARM
|
||||||
|
default "thumb" if ARCH_ARM_MODE_THUMB
|
||||||
|
|
||||||
|
choice
|
||||||
|
bool
|
||||||
|
prompt "Default instruction set mode"
|
||||||
|
default ARCH_ARM_MODE_ARM
|
||||||
|
|
||||||
|
config ARCH_ARM_MODE_ARM
|
||||||
|
bool
|
||||||
|
prompt "arm"
|
||||||
|
help
|
||||||
|
Defaults to emitting instructions in the ARM mode.
|
||||||
|
|
||||||
|
config ARCH_ARM_MODE_THUMB
|
||||||
|
bool
|
||||||
|
prompt "thumb"
|
||||||
|
help
|
||||||
|
Defaults to emitting instructions in the THUMB mode.
|
||||||
|
|
||||||
|
endchoice
|
||||||
|
|
||||||
|
config ARCH_ARM_INTERWORKING
|
||||||
|
bool
|
||||||
|
prompt "Use Thumb-interworking (READ HELP)"
|
||||||
|
help
|
||||||
|
Excerpt from the gcc manual:
|
||||||
|
|
||||||
|
> Generate code which supports calling between the ARM and Thumb
|
||||||
|
> instruction sets. Without this option the two instruction sets
|
||||||
|
> cannot be reliably used inside one program. The default is
|
||||||
|
> [not to use interwork], since slightly larger code is generated
|
||||||
|
> when [interwork] is specified.
|
||||||
|
|
||||||
|
NOTE: Interworking in crosstool-NG is not sell-tested. Use at your
|
||||||
|
own risks, and report success and/or failure.
|
||||||
|
|
||||||
|
# Until we only support EABI:
|
||||||
|
config ARCH_ARM_ABI_OK
|
||||||
|
def_bool y
|
||||||
|
depends on ! ARCH_ARM_EABI
|
||||||
|
select ARCH_SUPPORTS_WITH_ABI
|
||||||
|
|
||||||
|
# Little trick to force EABI *and* always show the prompt
|
||||||
|
config ARCH_ARM_EABI_FORCE
|
||||||
|
bool
|
||||||
|
default y if ! OBSOLETE
|
||||||
|
select ARCH_ARM_EABI
|
||||||
|
|
||||||
|
config ARCH_ARM_EABI
|
||||||
|
bool
|
||||||
|
prompt "Use EABI"
|
||||||
|
default y
|
||||||
|
help
|
||||||
|
Set up the toolchain so that it generates EABI-compliant binaries.
|
||||||
|
|
||||||
|
If you say 'n' here, then the toolchain will generate OABI binaries.
|
||||||
|
OABI has long been deprecated, and is now considered legacy.
|
||||||
|
|
||||||
|
config ARCH_ARM_TUPLE_USE_EABIHF
|
||||||
|
bool
|
||||||
|
prompt "append 'hf' to the tuple (EXPERIMENTAL)"
|
||||||
|
depends on ARCH_FLOAT_HW
|
||||||
|
depends on ARCH_ARM_EABI # Until we only support that...
|
||||||
|
default y
|
||||||
|
help
|
||||||
|
Is you say 'y' here, then the tuple for the toolchain will end
|
||||||
|
up with *eabihf, instead of the usual *eabi.
|
||||||
|
|
||||||
|
*eabihf is used to denote that the toolchain *is* using the
|
||||||
|
hard-float ABI, while *eabi is just an indication of using the
|
||||||
|
soft-float ABI.
|
||||||
|
|
||||||
|
Ie. all one can say is: *eabihf ⊢ hard-float ABI
|
||||||
|
|
||||||
|
Saying 'n' here does *not* impact the ability of the toolchain to
|
||||||
|
generate hard-float instructions with the hard-float ABI. It is a
|
||||||
|
purely cosmetic thing, used by distros to differentiate their
|
||||||
|
hard-float-ABI-using ports from their soft-float-ABI-using ports.
|
||||||
|
(eg. Debian Wheezy and above).
|
||||||
|
|
||||||
|
This is an option, as not all versions of gcc/binutils do support
|
||||||
|
such tuple, and fail to build with *eabihf. Stock gcc version up
|
||||||
|
to, and including 4.7.2 have an issue or another with *eabihf.
|
||||||
|
|
||||||
|
This option is here for the future.
|
||||||
|
|
||||||
|
Say 'n', unless you are trying to fix gcc to properly recognise
|
||||||
|
the *eabihf tuples.
|
||||||
|
|
||||||
|
endif
|
||||||
|
@ -1,96 +0,0 @@
|
|||||||
# ARM specific configuration file
|
|
||||||
|
|
||||||
if ARCH_32
|
|
||||||
config ARCH_ARM_MODE
|
|
||||||
string
|
|
||||||
default "arm" if ARCH_ARM_MODE_ARM
|
|
||||||
default "thumb" if ARCH_ARM_MODE_THUMB
|
|
||||||
|
|
||||||
choice
|
|
||||||
bool
|
|
||||||
prompt "Default instruction set mode"
|
|
||||||
default ARCH_ARM_MODE_ARM
|
|
||||||
|
|
||||||
config ARCH_ARM_MODE_ARM
|
|
||||||
bool
|
|
||||||
prompt "arm"
|
|
||||||
help
|
|
||||||
Defaults to emitting instructions in the ARM mode.
|
|
||||||
|
|
||||||
config ARCH_ARM_MODE_THUMB
|
|
||||||
bool
|
|
||||||
prompt "thumb"
|
|
||||||
help
|
|
||||||
Defaults to emitting instructions in the THUMB mode.
|
|
||||||
|
|
||||||
endchoice
|
|
||||||
|
|
||||||
config ARCH_ARM_INTERWORKING
|
|
||||||
bool
|
|
||||||
prompt "Use Thumb-interworking (READ HELP)"
|
|
||||||
help
|
|
||||||
Excerpt from the gcc manual:
|
|
||||||
|
|
||||||
> Generate code which supports calling between the ARM and Thumb
|
|
||||||
> instruction sets. Without this option the two instruction sets
|
|
||||||
> cannot be reliably used inside one program. The default is
|
|
||||||
> [not to use interwork], since slightly larger code is generated
|
|
||||||
> when [interwork] is specified.
|
|
||||||
|
|
||||||
NOTE: Interworking in crosstool-NG is not sell-tested. Use at your
|
|
||||||
own risks, and report success and/or failure.
|
|
||||||
|
|
||||||
# Until we only support EABI:
|
|
||||||
config ARCH_ARM_ABI_OK
|
|
||||||
def_bool y
|
|
||||||
depends on ! ARCH_ARM_EABI
|
|
||||||
select ARCH_SUPPORTS_WITH_ABI
|
|
||||||
|
|
||||||
# Little trick to force EABI *and* always show the prompt
|
|
||||||
config ARCH_ARM_EABI_FORCE
|
|
||||||
bool
|
|
||||||
default y if ! OBSOLETE
|
|
||||||
select ARCH_ARM_EABI
|
|
||||||
|
|
||||||
config ARCH_ARM_EABI
|
|
||||||
bool
|
|
||||||
prompt "Use EABI"
|
|
||||||
default y
|
|
||||||
help
|
|
||||||
Set up the toolchain so that it generates EABI-compliant binaries.
|
|
||||||
|
|
||||||
If you say 'n' here, then the toolchain will generate OABI binaries.
|
|
||||||
OABI has long been deprecated, and is now considered legacy.
|
|
||||||
|
|
||||||
config ARCH_ARM_TUPLE_USE_EABIHF
|
|
||||||
bool
|
|
||||||
prompt "append 'hf' to the tuple (EXPERIMENTAL)"
|
|
||||||
depends on ARCH_FLOAT_HW
|
|
||||||
depends on ARCH_ARM_EABI # Until we only support that...
|
|
||||||
default y
|
|
||||||
help
|
|
||||||
Is you say 'y' here, then the tuple for the toolchain will end
|
|
||||||
up with *eabihf, instead of the usual *eabi.
|
|
||||||
|
|
||||||
*eabihf is used to denote that the toolchain *is* using the
|
|
||||||
hard-float ABI, while *eabi is just an indication of using the
|
|
||||||
soft-float ABI.
|
|
||||||
|
|
||||||
Ie. all one can say is: *eabihf ⊢ hard-float ABI
|
|
||||||
|
|
||||||
Saying 'n' here does *not* impact the ability of the toolchain to
|
|
||||||
generate hard-float instructions with the hard-float ABI. It is a
|
|
||||||
purely cosmetic thing, used by distros to differentiate their
|
|
||||||
hard-float-ABI-using ports from their soft-float-ABI-using ports.
|
|
||||||
(eg. Debian Wheezy and above).
|
|
||||||
|
|
||||||
This is an option, as not all versions of gcc/binutils do support
|
|
||||||
such tuple, and fail to build with *eabihf. Stock gcc version up
|
|
||||||
to, and including 4.7.2 have an issue or another with *eabihf.
|
|
||||||
|
|
||||||
This option is here for the future.
|
|
||||||
|
|
||||||
Say 'n', unless you are trying to fix gcc to properly recognise
|
|
||||||
the *eabihf tuples.
|
|
||||||
|
|
||||||
endif
|
|
@ -9,6 +9,43 @@
|
|||||||
## select ARCH_SUPPORTS_WITH_ARCH
|
## select ARCH_SUPPORTS_WITH_ARCH
|
||||||
## select ARCH_SUPPORTS_WITH_TUNE
|
## select ARCH_SUPPORTS_WITH_TUNE
|
||||||
## select ARCH_SUPPORTS_WITH_FLOAT
|
## select ARCH_SUPPORTS_WITH_FLOAT
|
||||||
##
|
|
||||||
## help The MIPS architecture, as defined by:
|
## help The MIPS architecture, as defined by:
|
||||||
## help http://www.mips.com/
|
## help http://www.mips.com/
|
||||||
|
|
||||||
|
choice
|
||||||
|
bool
|
||||||
|
prompt "ABI"
|
||||||
|
|
||||||
|
config ARCH_mips_o32
|
||||||
|
bool
|
||||||
|
prompt "o32"
|
||||||
|
depends on (ARCH_32 || MULTILIB)
|
||||||
|
help
|
||||||
|
This is the -mabi=32 gcc option.
|
||||||
|
|
||||||
|
config ARCH_mips_n32
|
||||||
|
bool
|
||||||
|
prompt "n32"
|
||||||
|
depends on ARCH_64
|
||||||
|
help
|
||||||
|
This is the -mabi=n32 gcc option.
|
||||||
|
|
||||||
|
config ARCH_mips_n64
|
||||||
|
bool
|
||||||
|
prompt "n64"
|
||||||
|
depends on ARCH_64
|
||||||
|
help
|
||||||
|
This is the -mabi=64 gcc option.
|
||||||
|
|
||||||
|
# Not supported on Linux:
|
||||||
|
# o64 : seems related to *BSD
|
||||||
|
# eabi : seems related to bare-metal
|
||||||
|
|
||||||
|
endchoice
|
||||||
|
|
||||||
|
config ARCH_mips_ABI
|
||||||
|
string
|
||||||
|
default "32" if ARCH_mips_o32
|
||||||
|
default "n32" if ARCH_mips_n32
|
||||||
|
default "64" if ARCH_mips_n64
|
||||||
|
@ -1,38 +0,0 @@
|
|||||||
# MIPS specific config options
|
|
||||||
|
|
||||||
choice
|
|
||||||
bool
|
|
||||||
prompt "ABI"
|
|
||||||
|
|
||||||
config ARCH_mips_o32
|
|
||||||
bool
|
|
||||||
prompt "o32"
|
|
||||||
depends on (ARCH_32 || MULTILIB)
|
|
||||||
help
|
|
||||||
This is the -mabi=32 gcc option.
|
|
||||||
|
|
||||||
config ARCH_mips_n32
|
|
||||||
bool
|
|
||||||
prompt "n32"
|
|
||||||
depends on ARCH_64
|
|
||||||
help
|
|
||||||
This is the -mabi=n32 gcc option.
|
|
||||||
|
|
||||||
config ARCH_mips_n64
|
|
||||||
bool
|
|
||||||
prompt "n64"
|
|
||||||
depends on ARCH_64
|
|
||||||
help
|
|
||||||
This is the -mabi=64 gcc option.
|
|
||||||
|
|
||||||
# Not supported on Linux:
|
|
||||||
# o64 : seems related to *BSD
|
|
||||||
# eabi : seems related to bare-metal
|
|
||||||
|
|
||||||
endchoice
|
|
||||||
|
|
||||||
config ARCH_mips_ABI
|
|
||||||
string
|
|
||||||
default "32" if ARCH_mips_o32
|
|
||||||
default "n32" if ARCH_mips_n32
|
|
||||||
default "64" if ARCH_mips_n64
|
|
@ -1,4 +1,4 @@
|
|||||||
# powerpc specific configuration file
|
# Powerpc specific configuration file
|
||||||
|
|
||||||
## select ARCH_SUPPORTS_32
|
## select ARCH_SUPPORTS_32
|
||||||
## select ARCH_SUPPORTS_64
|
## select ARCH_SUPPORTS_64
|
||||||
@ -13,3 +13,44 @@
|
|||||||
##
|
##
|
||||||
## help The PowerPC architecture, as defined by:
|
## help The PowerPC architecture, as defined by:
|
||||||
## help http://www.ibm.com/developerworks/eserver/articles/archguide.html
|
## help http://www.ibm.com/developerworks/eserver/articles/archguide.html
|
||||||
|
|
||||||
|
config ARCH_powerpc_ABI
|
||||||
|
string
|
||||||
|
default "" if ARCH_powerpc_ABI_DEFAULT
|
||||||
|
default "eabi" if ARCH_powerpc_ABI_EABI
|
||||||
|
default "spe" if ARCH_powerpc_ABI_SPE
|
||||||
|
|
||||||
|
choice
|
||||||
|
bool
|
||||||
|
prompt "ABI"
|
||||||
|
default ARCH_powerpc_ABI_DEFAULT
|
||||||
|
|
||||||
|
config ARCH_powerpc_ABI_DEFAULT
|
||||||
|
bool
|
||||||
|
prompt "default"
|
||||||
|
help
|
||||||
|
The default ABI (System V.4).
|
||||||
|
|
||||||
|
config ARCH_powerpc_ABI_EABI
|
||||||
|
bool
|
||||||
|
prompt "EABI"
|
||||||
|
depends on BARE_METAL
|
||||||
|
help
|
||||||
|
The Embedded ABI (stack alignment of 8 bytes, etc).
|
||||||
|
|
||||||
|
config ARCH_powerpc_ABI_SPE
|
||||||
|
bool
|
||||||
|
prompt "SPE"
|
||||||
|
help
|
||||||
|
Add support for the Signal Processing Engine. This will set up
|
||||||
|
the toolchain so that it supports the SPE ABI extensions. This
|
||||||
|
mainly targets Freescale e500 processors.
|
||||||
|
|
||||||
|
Setting this option will append "spe" to the end of your target
|
||||||
|
tuple name (e.g., powerpc-e500v2-linux-gnuspe) so that the gcc
|
||||||
|
configure/build system will know to include SPE ABI support. It
|
||||||
|
will also automatically add "-mabi=spe -mspe" to your TARGET_CFLAGS,
|
||||||
|
and "--enable-e500_double" to your CC_EXTRA_CONFIG_ARRAY, so you
|
||||||
|
do not need to explicitly add them.
|
||||||
|
|
||||||
|
endchoice
|
||||||
|
@ -1,42 +0,0 @@
|
|||||||
# powerpc specific configuration file
|
|
||||||
|
|
||||||
config ARCH_powerpc_ABI
|
|
||||||
string
|
|
||||||
default "" if ARCH_powerpc_ABI_DEFAULT
|
|
||||||
default "eabi" if ARCH_powerpc_ABI_EABI
|
|
||||||
default "spe" if ARCH_powerpc_ABI_SPE
|
|
||||||
|
|
||||||
choice
|
|
||||||
bool
|
|
||||||
prompt "ABI"
|
|
||||||
default ARCH_powerpc_ABI_DEFAULT
|
|
||||||
|
|
||||||
config ARCH_powerpc_ABI_DEFAULT
|
|
||||||
bool
|
|
||||||
prompt "default"
|
|
||||||
help
|
|
||||||
The default ABI (System V.4).
|
|
||||||
|
|
||||||
config ARCH_powerpc_ABI_EABI
|
|
||||||
bool
|
|
||||||
prompt "EABI"
|
|
||||||
depends on BARE_METAL
|
|
||||||
help
|
|
||||||
The Embedded ABI (stack alignment of 8 bytes, etc).
|
|
||||||
|
|
||||||
config ARCH_powerpc_ABI_SPE
|
|
||||||
bool
|
|
||||||
prompt "SPE"
|
|
||||||
help
|
|
||||||
Add support for the Signal Processing Engine. This will set up
|
|
||||||
the toolchain so that it supports the SPE ABI extensions. This
|
|
||||||
mainly targets Freescale e500 processors.
|
|
||||||
|
|
||||||
Setting this option will append "spe" to the end of your target
|
|
||||||
tuple name (e.g., powerpc-e500v2-linux-gnuspe) so that the gcc
|
|
||||||
configure/build system will know to include SPE ABI support. It
|
|
||||||
will also automatically add "-mabi=spe -mspe" to your TARGET_CFLAGS,
|
|
||||||
and "--enable-e500_double" to your CC_EXTRA_CONFIG_ARRAY, so you
|
|
||||||
do not need to explicitly add them.
|
|
||||||
|
|
||||||
endchoice
|
|
@ -9,3 +9,27 @@
|
|||||||
##
|
##
|
||||||
## help The Super-H architecture, as defined by:
|
## help The Super-H architecture, as defined by:
|
||||||
## help http://www.renesas.com/fmwk.jsp?cnt=superh_family_landing.jsp&fp=/products/mpumcu/superh_family/
|
## help http://www.renesas.com/fmwk.jsp?cnt=superh_family_landing.jsp&fp=/products/mpumcu/superh_family/
|
||||||
|
|
||||||
|
choice
|
||||||
|
bool
|
||||||
|
prompt "Variant"
|
||||||
|
|
||||||
|
config ARCH_SH_SH3
|
||||||
|
bool
|
||||||
|
prompt "sh3"
|
||||||
|
|
||||||
|
config ARCH_SH_SH4
|
||||||
|
bool
|
||||||
|
prompt "sh4"
|
||||||
|
|
||||||
|
config ARCH_SH_SH4A
|
||||||
|
bool
|
||||||
|
prompt "sh4a"
|
||||||
|
|
||||||
|
endchoice
|
||||||
|
|
||||||
|
config ARCH_SH_VARIANT
|
||||||
|
string
|
||||||
|
default "sh3" if ARCH_SH_SH3
|
||||||
|
default "sh4" if ARCH_SH_SH4
|
||||||
|
default "sh4a" if ARCH_SH_SH4A
|
||||||
|
@ -1,25 +0,0 @@
|
|||||||
# Super-H specific configuration file
|
|
||||||
|
|
||||||
choice
|
|
||||||
bool
|
|
||||||
prompt "Variant"
|
|
||||||
|
|
||||||
config ARCH_SH_SH3
|
|
||||||
bool
|
|
||||||
prompt "sh3"
|
|
||||||
|
|
||||||
config ARCH_SH_SH4
|
|
||||||
bool
|
|
||||||
prompt "sh4"
|
|
||||||
|
|
||||||
config ARCH_SH_SH4A
|
|
||||||
bool
|
|
||||||
prompt "sh4a"
|
|
||||||
|
|
||||||
endchoice
|
|
||||||
|
|
||||||
config ARCH_SH_VARIANT
|
|
||||||
string
|
|
||||||
default "sh3" if ARCH_SH_SH3
|
|
||||||
default "sh4" if ARCH_SH_SH4
|
|
||||||
default "sh4a" if ARCH_SH_SH4A
|
|
@ -5,7 +5,7 @@
|
|||||||
## select ARCH_DEFAULT_LE
|
## select ARCH_DEFAULT_LE
|
||||||
## select ARCH_SUPPORTS_BOTH_MMU
|
## select ARCH_SUPPORTS_BOTH_MMU
|
||||||
## select ARCH_DEFAULT_HAS_MMU
|
## select ARCH_DEFAULT_HAS_MMU
|
||||||
##
|
|
||||||
## help The xtensa architecture
|
## help The xtensa architecture
|
||||||
## help
|
## help
|
||||||
## help Xtensa is a configurable and extensible processor architecture.
|
## help Xtensa is a configurable and extensible processor architecture.
|
||||||
@ -20,3 +20,16 @@
|
|||||||
## help
|
## help
|
||||||
## help The default option (ARCH_xtensa_fsf) uses a built-in configuration,
|
## help The default option (ARCH_xtensa_fsf) uses a built-in configuration,
|
||||||
## help which may or may not work for a particular Xtensa processor.
|
## help which may or may not work for a particular Xtensa processor.
|
||||||
|
|
||||||
|
choice
|
||||||
|
prompt "Target Architecture Variant"
|
||||||
|
default ARCH_xtensa_fsf
|
||||||
|
|
||||||
|
config XTENSA_CUSTOM
|
||||||
|
bool "Custom Xtensa processor configuration"
|
||||||
|
select TARGET_USE_OVERLAY
|
||||||
|
|
||||||
|
config ARCH_xtensa_fsf
|
||||||
|
bool "fsf - Default configuration"
|
||||||
|
|
||||||
|
endchoice
|
||||||
|
@ -1,12 +0,0 @@
|
|||||||
choice
|
|
||||||
prompt "Target Architecture Variant"
|
|
||||||
default ARCH_xtensa_fsf
|
|
||||||
|
|
||||||
config XTENSA_CUSTOM
|
|
||||||
bool "Custom Xtensa processor configuration"
|
|
||||||
select TARGET_USE_OVERLAY
|
|
||||||
|
|
||||||
config ARCH_xtensa_fsf
|
|
||||||
bool "fsf - Default configuration"
|
|
||||||
|
|
||||||
endchoice
|
|
@ -34,6 +34,5 @@ config ARCH_BINFMT_FDPIC
|
|||||||
endchoice
|
endchoice
|
||||||
|
|
||||||
source "config/gen/binutils.in"
|
source "config/gen/binutils.in"
|
||||||
source "config/gen/binutils.in.2"
|
|
||||||
|
|
||||||
endmenu
|
endmenu
|
||||||
|
@ -128,6 +128,4 @@ config CC_LANG_OTHERS
|
|||||||
Eg. gcc-4.1+ has a toy programming language, treelang. As it is not useful
|
Eg. gcc-4.1+ has a toy programming language, treelang. As it is not useful
|
||||||
in real life, it is not available in the selection above.
|
in real life, it is not available in the selection above.
|
||||||
|
|
||||||
source "config/gen/cc.in.2"
|
|
||||||
|
|
||||||
endmenu
|
endmenu
|
||||||
|
419
config/cc/gcc.in
419
config/cc/gcc.in
@ -1,5 +1,5 @@
|
|||||||
# Compiler options
|
# GCC options
|
||||||
#
|
|
||||||
## default y
|
## default y
|
||||||
## select CC_SUPPORT_CXX if !LIBC_none
|
## select CC_SUPPORT_CXX if !LIBC_none
|
||||||
## select CC_SUPPORT_FORTRAN
|
## select CC_SUPPORT_FORTRAN
|
||||||
@ -19,10 +19,423 @@
|
|||||||
## select ISL_REQUIRE_0_10_or_later if ISL_NEEDED && GCC_4_8_or_later
|
## select ISL_REQUIRE_0_10_or_later if ISL_NEEDED && GCC_4_8_or_later
|
||||||
## select ISL_REQUIRE_0_15_or_older if ISL_NEEDED && GCC_4_9_or_later && !GCC_5_or_later
|
## select ISL_REQUIRE_0_15_or_older if ISL_NEEDED && GCC_4_9_or_later && !GCC_5_or_later
|
||||||
## select ISL_REQUIRE_0_14_or_older if ISL_NEEDED && GCC_4_8_or_later && !GCC_4_9_or_later
|
## select ISL_REQUIRE_0_14_or_older if ISL_NEEDED && GCC_4_8_or_later && !GCC_4_9_or_later
|
||||||
##
|
|
||||||
## help gcc is the full-blown GNU compiler. This is what most people will choose.
|
## help gcc is the full-blown GNU compiler. This is what most people will choose.
|
||||||
## help
|
## help
|
||||||
## help gcc supports many languages, a powerful code parser, optimised binary
|
## help gcc supports many languages, a powerful code parser, optimised binary
|
||||||
## help output, and lots of other features.
|
## help output, and lots of other features.
|
||||||
|
|
||||||
source "config/versions/gcc.in"
|
source "config/versions/gcc.in"
|
||||||
|
|
||||||
|
# Only enable gcc's support for plugins if binutils has it as well
|
||||||
|
# They are useful only when doing LTO, but it does no harm enabling
|
||||||
|
# them even without LTO.
|
||||||
|
config CC_GCC_ENABLE_PLUGINS
|
||||||
|
bool
|
||||||
|
depends on BINUTILS_PLUGINS
|
||||||
|
depends on ! STATIC_TOOLCHAIN
|
||||||
|
default y
|
||||||
|
|
||||||
|
# Affects the build of musl
|
||||||
|
config GCC_BUG_61144
|
||||||
|
bool
|
||||||
|
default y if GCC_4_9_or_later && !GCC_4_9_2_or_later
|
||||||
|
|
||||||
|
# If binutils installs gold, enable support for gold in gcc
|
||||||
|
config CC_GCC_GOLD
|
||||||
|
bool
|
||||||
|
depends on BINUTILS_GOLD_INSTALLED
|
||||||
|
default y
|
||||||
|
|
||||||
|
config CC_GCC_HAS_LIBMPX
|
||||||
|
depends on GCC_5_or_later
|
||||||
|
bool
|
||||||
|
|
||||||
|
config CC_LANG_JAVA_USE_ECJ
|
||||||
|
bool
|
||||||
|
default y
|
||||||
|
depends on CC_LANG_JAVA
|
||||||
|
|
||||||
|
config CC_GCC_ENABLE_CXX_FLAGS
|
||||||
|
string
|
||||||
|
prompt "Flags to pass to --enable-cxx-flags"
|
||||||
|
default ""
|
||||||
|
help
|
||||||
|
Enter here the value of the gcc's ./configure option --enable-cxx-flags.
|
||||||
|
Leave empty if you don't know better.
|
||||||
|
|
||||||
|
Note: just pass in the option _value_, that is only the part that goes
|
||||||
|
after the '=' sign.
|
||||||
|
|
||||||
|
config CC_GCC_CORE_EXTRA_CONFIG_ARRAY
|
||||||
|
string
|
||||||
|
prompt "Core gcc extra config"
|
||||||
|
default ""
|
||||||
|
depends on CC_CORE_PASS_1_NEEDED || CC_CORE_PASS_2_NEEDED
|
||||||
|
help
|
||||||
|
Extra flags to pass onto ./configure when configuring the core gcc.
|
||||||
|
|
||||||
|
The core gcc is a stripped down, C-only compiler needed to build
|
||||||
|
the C library. Kinda bootstrap gcc, if you wish.
|
||||||
|
|
||||||
|
You can enter multiple arguments here, and arguments can contain spaces
|
||||||
|
if they are properly quoted (or escaped, but prefer quotes). Eg.:
|
||||||
|
--with-foo="1st arg with 4 spaces" --with-bar=2nd-arg-without-space
|
||||||
|
|
||||||
|
config CC_GCC_EXTRA_CONFIG_ARRAY
|
||||||
|
string
|
||||||
|
prompt "gcc extra config"
|
||||||
|
default ""
|
||||||
|
help
|
||||||
|
Extra flags to pass onto ./configure when configuring gcc.
|
||||||
|
|
||||||
|
You can enter multiple arguments here, and arguments can contain spaces
|
||||||
|
if they are properly quoted (or escaped, but prefer quotes). Eg.:
|
||||||
|
--with-foo="1st arg with 4 spaces" --with-bar=2nd-arg-without-space
|
||||||
|
|
||||||
|
config CC_GCC_MULTILIB_LIST
|
||||||
|
string
|
||||||
|
prompt "List of multilib variants"
|
||||||
|
depends on MULTILIB
|
||||||
|
help
|
||||||
|
Architecture-specific option of expanding or restricting the list of
|
||||||
|
the multilib variants to be built. Refer to GCC installation manual
|
||||||
|
for the format of this option for a particular architecture.
|
||||||
|
Leave empty to use the default list for this architecture.
|
||||||
|
|
||||||
|
config STATIC_TOOLCHAIN
|
||||||
|
bool
|
||||||
|
select CC_GCC_STATIC_LIBSTDCXX
|
||||||
|
|
||||||
|
config CC_GCC_STATIC_LIBSTDCXX
|
||||||
|
bool
|
||||||
|
prompt "Link libstdc++ statically into the gcc binary"
|
||||||
|
default y
|
||||||
|
depends on CONFIGURE_has_static_link || CANADIAN || CROSS_NATIVE
|
||||||
|
select WANTS_STATIC_LINK if CROSS || NATIVE
|
||||||
|
select WANTS_STATIC_LINK_CXX if CROSS || NATIVE
|
||||||
|
help
|
||||||
|
Newer gcc versions require some c++ libraries. So statically
|
||||||
|
linking libstdc++ increases the likeliness that the gcc binary will
|
||||||
|
run on machines other than the one which it was built on, without
|
||||||
|
having to worry about distributing the matching version of libstdc++
|
||||||
|
along with it.
|
||||||
|
|
||||||
|
config CC_GCC_SYSTEM_ZLIB
|
||||||
|
bool
|
||||||
|
prompt "Use system zlib"
|
||||||
|
help
|
||||||
|
Do not use bundled zlib, and use the zlib already available for
|
||||||
|
the host (eg. the system library).
|
||||||
|
|
||||||
|
If zlib is built as a companion library, selecting this option
|
||||||
|
will use it.
|
||||||
|
|
||||||
|
If you want to build a static toolchain, you will need to also
|
||||||
|
install the static version of zlib for your host.
|
||||||
|
|
||||||
|
If unsure, say 'n'.
|
||||||
|
|
||||||
|
config CC_GCC_CONFIG_TLS
|
||||||
|
tristate
|
||||||
|
prompt "Configure TLS (Thread Local Storage)"
|
||||||
|
default m
|
||||||
|
help
|
||||||
|
Specify that the target supports TLS (Thread Local Storage). Usually
|
||||||
|
configure can correctly determine if TLS is supported. In cases where
|
||||||
|
it guesses incorrectly, TLS can be explicitly enabled or disabled.
|
||||||
|
This can happen if the assembler supports TLS but the C library does
|
||||||
|
not, or if the assumptions made by the configure test are incorrect.
|
||||||
|
|
||||||
|
Option | TLS use | Associated ./configure switch
|
||||||
|
---------+--------------------+--------------------------------
|
||||||
|
Y | forcibly used | --enable-tls
|
||||||
|
M | auto | (none, ./configure decides)
|
||||||
|
N | forcibly not used | --disable-tls
|
||||||
|
|
||||||
|
If unsure, say 'M'.
|
||||||
|
|
||||||
|
#-----------------------------------------------------------------------------
|
||||||
|
# Optimisation features
|
||||||
|
|
||||||
|
comment "Optimisation features"
|
||||||
|
|
||||||
|
# Defined in config/cc/gcc.in
|
||||||
|
# For graphite: gcc needs cloog and isl
|
||||||
|
# In >= gcc-5.x, cloog is no longer needed, but isl is.
|
||||||
|
config CC_GCC_USE_GRAPHITE
|
||||||
|
bool "Enable GRAPHITE loop optimisations"
|
||||||
|
default y
|
||||||
|
select CLOOG_NEEDED if !GCC_5_or_later
|
||||||
|
select ISL_NEEDED
|
||||||
|
help
|
||||||
|
Enable the GRAPHITE loop optimsations.
|
||||||
|
|
||||||
|
On some systems (eg. Cygwin), CLooG and ISL (required to enable
|
||||||
|
GRAPHITE) may not build properly (yet), so you'll have to say 'N'
|
||||||
|
here (or help debug the issues)
|
||||||
|
|
||||||
|
TODO: Is this still true on Cygwin?
|
||||||
|
|
||||||
|
# The way LTO works is a bit twisted.
|
||||||
|
# See: http://gcc.gnu.org/wiki/LinkTimeOptimization#Requirements
|
||||||
|
# Basically:
|
||||||
|
# - if binutils has plugins: LTO is handled by ld/gold by loading
|
||||||
|
# the plugin when linking
|
||||||
|
# - if binutils does not have plugins: LTO is handled by collect2
|
||||||
|
# In any case, LTO support does not depend on plugins, but takes
|
||||||
|
# advantage of it
|
||||||
|
config CC_GCC_USE_LTO
|
||||||
|
bool "Enable LTO"
|
||||||
|
default y
|
||||||
|
depends on ! STATIC_TOOLCHAIN
|
||||||
|
help
|
||||||
|
Enable the Link Time Optimisations.
|
||||||
|
|
||||||
|
#-----------------------------------------------------------------------------
|
||||||
|
comment "Settings for libraries running on target"
|
||||||
|
|
||||||
|
config CC_GCC_ENABLE_TARGET_OPTSPACE
|
||||||
|
bool
|
||||||
|
prompt "Optimize gcc libs for size"
|
||||||
|
default y
|
||||||
|
help
|
||||||
|
Pass --enable-target-optspace to crossgcc's configure.
|
||||||
|
|
||||||
|
This will compile crossgcc's libs with -Os.
|
||||||
|
|
||||||
|
config CC_GCC_LIBMUDFLAP
|
||||||
|
bool
|
||||||
|
prompt "Compile libmudflap"
|
||||||
|
help
|
||||||
|
libmudflap is a pointer-use checking tool, which can detect
|
||||||
|
various mis-usages of pointers in C and (to some extents) C++.
|
||||||
|
|
||||||
|
You should say 'N' here, as libmduflap generates instrumented
|
||||||
|
code (thus it is a bit bigger and a bit slower) and requires
|
||||||
|
re-compilation and re-link, while it exists better run-time
|
||||||
|
alternatives (eg. DUMA, dmalloc...) that need neither re-
|
||||||
|
compilation nor re-link.
|
||||||
|
|
||||||
|
config CC_GCC_LIBGOMP
|
||||||
|
bool
|
||||||
|
prompt "Compile libgomp"
|
||||||
|
depends on !THREADS_NONE
|
||||||
|
help
|
||||||
|
libgomp is "the GNU implementation of the OpenMP Application Programming
|
||||||
|
Interface (API) for multi-platform shared-memory parallel programming in
|
||||||
|
C/C++ and Fortran". See:
|
||||||
|
http://gcc.gnu.org/onlinedocs/libgomp/
|
||||||
|
|
||||||
|
GNU OpenMP support requires threading.
|
||||||
|
|
||||||
|
The default is 'N'. Say 'Y' if you need it, and report success/failure.
|
||||||
|
|
||||||
|
config CC_GCC_LIBSSP
|
||||||
|
bool
|
||||||
|
prompt "Compile libssp"
|
||||||
|
help
|
||||||
|
libssp is the run-time Stack-Smashing Protection library.
|
||||||
|
|
||||||
|
The default is 'N'. Say 'Y' if you need it, and report success/failure.
|
||||||
|
|
||||||
|
config CC_GCC_LIBQUADMATH
|
||||||
|
bool
|
||||||
|
prompt "Compile libquadmath"
|
||||||
|
help
|
||||||
|
libquadmath is a library which provides quad-precision mathematical
|
||||||
|
functions on targets supporting the __float128 datatype. See:
|
||||||
|
http://gcc.gnu.org/onlinedocs/libquadmath/
|
||||||
|
|
||||||
|
The default is 'N'. Say 'Y' if you need it, and report success/failure.
|
||||||
|
|
||||||
|
config CC_GCC_LIBSANITIZER
|
||||||
|
bool
|
||||||
|
prompt "Compile libsanitizer"
|
||||||
|
depends on THREADS_NATIVE
|
||||||
|
depends on ! LIBC_uClibc && ! LIBC_musl # Currently lacks required headers (like netrom.h)
|
||||||
|
help
|
||||||
|
libsanitizer is a library which provides run-time sanitising of either
|
||||||
|
or both of:
|
||||||
|
- memory access patterns (out-of-bonds, use-after-free)
|
||||||
|
- racy data accesses (in multi-threaded programs)
|
||||||
|
|
||||||
|
The default is 'N'. Say 'Y' if you need it, and report success/failure.
|
||||||
|
|
||||||
|
config CC_GCC_LIBMPX
|
||||||
|
bool
|
||||||
|
default y
|
||||||
|
prompt "Compile libmpx"
|
||||||
|
depends on CC_GCC_HAS_LIBMPX
|
||||||
|
depends on ARCH_x86
|
||||||
|
# MUSL does not define libc types that GCC requires. Mingw lacks certain headers.
|
||||||
|
depends on !LIBC_musl && ! LIBC_mingw
|
||||||
|
help
|
||||||
|
Enable GCC support for Intel Memory Protection Extensions (MPX).
|
||||||
|
|
||||||
|
#-----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
comment "Misc. obscure options."
|
||||||
|
|
||||||
|
config CC_CXA_ATEXIT
|
||||||
|
bool
|
||||||
|
prompt "Use __cxa_atexit"
|
||||||
|
default y
|
||||||
|
depends on ! BARE_METAL || LIBC_PROVIDES_CXA_ATEXIT
|
||||||
|
help
|
||||||
|
If you get the missing symbol "__cxa_atexit" when building C++ programs,
|
||||||
|
you might want to try disabling this option.
|
||||||
|
|
||||||
|
config CC_GCC_DISABLE_PCH
|
||||||
|
bool
|
||||||
|
prompt "Do not build PCH"
|
||||||
|
help
|
||||||
|
Say 'y' here to not use Pre-Compiled Headers in the resulting toolchain.
|
||||||
|
at the expense of speed when compiling C++ code.
|
||||||
|
|
||||||
|
For some configurations (most notably canadian?), PCH are broken, and
|
||||||
|
need to be disabled. Please see:
|
||||||
|
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40974
|
||||||
|
|
||||||
|
config CC_GCC_SJLJ_EXCEPTIONS
|
||||||
|
tristate
|
||||||
|
prompt "Use sjlj for exceptions"
|
||||||
|
depends on ! BARE_METAL
|
||||||
|
default m
|
||||||
|
help
|
||||||
|
'sjlj' is short for setjmp/longjmp.
|
||||||
|
|
||||||
|
On some architectures, stack unwinding during exception handling
|
||||||
|
works perfectly well without using sjlj, while on some others,
|
||||||
|
use of sjlj is required for proper stack unwinding.
|
||||||
|
|
||||||
|
Option | sjlj use | Associated ./configure switch
|
||||||
|
---------+--------------------+--------------------------------
|
||||||
|
Y | forcibly used | --enable-sjlj-exceptions
|
||||||
|
M | auto | (none, ./configure decides)
|
||||||
|
N | forcibly not used | --disable-sjlj-exceptions
|
||||||
|
|
||||||
|
It should be safe to say 'M' or 'N'.
|
||||||
|
|
||||||
|
It can happen that ./configure is wrong in some cases. Known
|
||||||
|
case is for ARM big endian, where you should say 'N'.
|
||||||
|
|
||||||
|
config CC_GCC_LDBL_128
|
||||||
|
tristate
|
||||||
|
prompt "Enable 128-bit long doubles"
|
||||||
|
default m
|
||||||
|
help
|
||||||
|
Saying 'Y' will force gcc to use 128-bit wide long doubles
|
||||||
|
Saying 'N' will force gcc to use 64-bit wide long doubles
|
||||||
|
Saying 'M' will let gcc choose (default is 128-bit for
|
||||||
|
glibc >= 2.4, 64-bit otherwise)
|
||||||
|
|
||||||
|
If in doubt, keep the default, ie. 'M'.
|
||||||
|
|
||||||
|
config CC_GCC_BUILD_ID
|
||||||
|
bool
|
||||||
|
prompt "Enable build-id"
|
||||||
|
help
|
||||||
|
Tells GCC to pass --build-id option to the linker for all final
|
||||||
|
links (links performed without the -r or --relocatable option),
|
||||||
|
if the linker supports it. If you say 'y' here, but your linker
|
||||||
|
does not support --build-id option, a warning is issued and this
|
||||||
|
option is ignored.
|
||||||
|
|
||||||
|
The default is off.
|
||||||
|
|
||||||
|
choice CC_GCC_LNK_HASH_STYLE_CHOICE
|
||||||
|
bool
|
||||||
|
prompt "linker hash style"
|
||||||
|
depends on BINUTILS_HAS_HASH_STYLE
|
||||||
|
|
||||||
|
config CC_GCC_LNK_HASH_STYLE_DEFAULT
|
||||||
|
bool
|
||||||
|
prompt "Default"
|
||||||
|
help
|
||||||
|
Do not specify any value, and use the default value (sysv).
|
||||||
|
|
||||||
|
config CC_GCC_LNK_HASH_STYLE_SYSV
|
||||||
|
bool
|
||||||
|
prompt "sysv"
|
||||||
|
help
|
||||||
|
Force use of the SYSV hash style.
|
||||||
|
|
||||||
|
config CC_GCC_LNK_HASH_STYLE_GNU
|
||||||
|
bool
|
||||||
|
prompt "gnu"
|
||||||
|
help
|
||||||
|
Force use of the GNU hash style.
|
||||||
|
|
||||||
|
config CC_GCC_LNK_HASH_STYLE_BOTH
|
||||||
|
bool
|
||||||
|
prompt "both"
|
||||||
|
help
|
||||||
|
Force use of both hash styles.
|
||||||
|
|
||||||
|
endchoice # CC_GCC_LNK_HASH_STYLE_CHOICE
|
||||||
|
|
||||||
|
config CC_GCC_LNK_HASH_STYLE
|
||||||
|
string
|
||||||
|
default "" if CC_GCC_LNK_HASH_STYLE_DEFAULT
|
||||||
|
default "sysv" if CC_GCC_LNK_HASH_STYLE_SYSV
|
||||||
|
default "gnu" if CC_GCC_LNK_HASH_STYLE_GNU
|
||||||
|
default "both" if CC_GCC_LNK_HASH_STYLE_BOTH
|
||||||
|
|
||||||
|
choice CC_GCC_DEC_FLOATS_CHOICE
|
||||||
|
bool "Decimal floats"
|
||||||
|
default CC_GCC_DEC_FLOATS_AUTO
|
||||||
|
help
|
||||||
|
Choose what type of decimal floats to support.
|
||||||
|
|
||||||
|
Note that using decimal floats requires a C library that provides
|
||||||
|
support for fenv (namely, the fenv.h header). This is the case
|
||||||
|
for (e)glibc, and uClibc on x86/32. For other C libraries, or
|
||||||
|
uClibc on other archs, this might not be the case, so you should
|
||||||
|
disable support for decimal floats.
|
||||||
|
|
||||||
|
The default is to let ./configure decide.
|
||||||
|
|
||||||
|
config CC_GCC_DEC_FLOAT_AUTO
|
||||||
|
bool "auto"
|
||||||
|
help
|
||||||
|
Let ./configure decide. If you say 'y' here, gcc will default to:
|
||||||
|
- 'bid' for x86 (32- and 64-bit)
|
||||||
|
- 'dpd' for powerpc
|
||||||
|
- 'no' for the other architectures
|
||||||
|
|
||||||
|
config CC_GCC_DEC_FLOAT_BID
|
||||||
|
bool "bid"
|
||||||
|
help
|
||||||
|
Use the 'binary integer decimal' format for decimal floats.
|
||||||
|
|
||||||
|
config CC_GCC_DEC_FLOAT_DPD
|
||||||
|
bool "dpd"
|
||||||
|
help
|
||||||
|
Use the 'densely packed decimal' for decimal floats.
|
||||||
|
|
||||||
|
config CC_GCC_DEC_FLOATS_NO
|
||||||
|
bool "no"
|
||||||
|
help
|
||||||
|
Do not support decimal floats. The default.
|
||||||
|
|
||||||
|
endchoice # CC_GCC_DEC_FLOATS_CHOICE
|
||||||
|
|
||||||
|
config CC_GCC_DEC_FLOATS
|
||||||
|
string
|
||||||
|
default "" if CC_GCC_DEC_FLOATS_AUTO
|
||||||
|
default "bid" if CC_GCC_DEC_FLOATS_BID
|
||||||
|
default "dpd" if CC_GCC_DEC_FLOATS_DPD
|
||||||
|
default "no" if CC_GCC_DEC_FLOATS_NO
|
||||||
|
|
||||||
|
#-----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
config CC_GCC_HAS_ARCH_OPTIONS
|
||||||
|
bool
|
||||||
|
|
||||||
|
comment "archictecture-specific options"
|
||||||
|
depends on CC_GCC_HAS_ARCH_OPTIONS
|
||||||
|
|
||||||
|
if ARCH_mips
|
||||||
|
source "config/cc/gcc.in.mips"
|
||||||
|
endif # ARCH_mips
|
||||||
|
@ -1,413 +0,0 @@
|
|||||||
# Only enable gcc's support for plugins if binutils has it as well
|
|
||||||
# They are useful only when doing LTO, but it does no harm enabling
|
|
||||||
# them even without LTO.
|
|
||||||
config CC_GCC_ENABLE_PLUGINS
|
|
||||||
bool
|
|
||||||
depends on BINUTILS_PLUGINS
|
|
||||||
depends on ! STATIC_TOOLCHAIN
|
|
||||||
default y
|
|
||||||
|
|
||||||
# Affects the build of musl
|
|
||||||
config GCC_BUG_61144
|
|
||||||
bool
|
|
||||||
default y if GCC_4_9_or_later && !GCC_4_9_2_or_later
|
|
||||||
|
|
||||||
# If binutils installs gold, enable support for gold in gcc
|
|
||||||
config CC_GCC_GOLD
|
|
||||||
bool
|
|
||||||
depends on BINUTILS_GOLD_INSTALLED
|
|
||||||
default y
|
|
||||||
|
|
||||||
config CC_GCC_HAS_LIBMPX
|
|
||||||
depends on GCC_5_or_later
|
|
||||||
bool
|
|
||||||
|
|
||||||
config CC_LANG_JAVA_USE_ECJ
|
|
||||||
bool
|
|
||||||
default y
|
|
||||||
depends on CC_LANG_JAVA
|
|
||||||
|
|
||||||
config CC_GCC_ENABLE_CXX_FLAGS
|
|
||||||
string
|
|
||||||
prompt "Flags to pass to --enable-cxx-flags"
|
|
||||||
default ""
|
|
||||||
help
|
|
||||||
Enter here the value of the gcc's ./configure option --enable-cxx-flags.
|
|
||||||
Leave empty if you don't know better.
|
|
||||||
|
|
||||||
Note: just pass in the option _value_, that is only the part that goes
|
|
||||||
after the '=' sign.
|
|
||||||
|
|
||||||
config CC_GCC_CORE_EXTRA_CONFIG_ARRAY
|
|
||||||
string
|
|
||||||
prompt "Core gcc extra config"
|
|
||||||
default ""
|
|
||||||
depends on CC_CORE_PASS_1_NEEDED || CC_CORE_PASS_2_NEEDED
|
|
||||||
help
|
|
||||||
Extra flags to pass onto ./configure when configuring the core gcc.
|
|
||||||
|
|
||||||
The core gcc is a stripped down, C-only compiler needed to build
|
|
||||||
the C library. Kinda bootstrap gcc, if you wish.
|
|
||||||
|
|
||||||
You can enter multiple arguments here, and arguments can contain spaces
|
|
||||||
if they are properly quoted (or escaped, but prefer quotes). Eg.:
|
|
||||||
--with-foo="1st arg with 4 spaces" --with-bar=2nd-arg-without-space
|
|
||||||
|
|
||||||
config CC_GCC_EXTRA_CONFIG_ARRAY
|
|
||||||
string
|
|
||||||
prompt "gcc extra config"
|
|
||||||
default ""
|
|
||||||
help
|
|
||||||
Extra flags to pass onto ./configure when configuring gcc.
|
|
||||||
|
|
||||||
You can enter multiple arguments here, and arguments can contain spaces
|
|
||||||
if they are properly quoted (or escaped, but prefer quotes). Eg.:
|
|
||||||
--with-foo="1st arg with 4 spaces" --with-bar=2nd-arg-without-space
|
|
||||||
|
|
||||||
config CC_GCC_MULTILIB_LIST
|
|
||||||
string
|
|
||||||
prompt "List of multilib variants"
|
|
||||||
depends on MULTILIB
|
|
||||||
help
|
|
||||||
Architecture-specific option of expanding or restricting the list of
|
|
||||||
the multilib variants to be built. Refer to GCC installation manual
|
|
||||||
for the format of this option for a particular architecture.
|
|
||||||
Leave empty to use the default list for this architecture.
|
|
||||||
|
|
||||||
config STATIC_TOOLCHAIN
|
|
||||||
bool
|
|
||||||
select CC_GCC_STATIC_LIBSTDCXX
|
|
||||||
|
|
||||||
config CC_GCC_STATIC_LIBSTDCXX
|
|
||||||
bool
|
|
||||||
prompt "Link libstdc++ statically into the gcc binary"
|
|
||||||
default y
|
|
||||||
depends on CONFIGURE_has_static_link || CANADIAN || CROSS_NATIVE
|
|
||||||
select WANTS_STATIC_LINK if CROSS || NATIVE
|
|
||||||
select WANTS_STATIC_LINK_CXX if CROSS || NATIVE
|
|
||||||
help
|
|
||||||
Newer gcc versions require some c++ libraries. So statically
|
|
||||||
linking libstdc++ increases the likeliness that the gcc binary will
|
|
||||||
run on machines other than the one which it was built on, without
|
|
||||||
having to worry about distributing the matching version of libstdc++
|
|
||||||
along with it.
|
|
||||||
|
|
||||||
config CC_GCC_SYSTEM_ZLIB
|
|
||||||
bool
|
|
||||||
prompt "Use system zlib"
|
|
||||||
help
|
|
||||||
Do not use bundled zlib, and use the zlib already available for
|
|
||||||
the host (eg. the system library).
|
|
||||||
|
|
||||||
If zlib is built as a companion library, selecting this option
|
|
||||||
will use it.
|
|
||||||
|
|
||||||
If you want to build a static toolchain, you will need to also
|
|
||||||
install the static version of zlib for your host.
|
|
||||||
|
|
||||||
If unsure, say 'n'.
|
|
||||||
|
|
||||||
config CC_GCC_CONFIG_TLS
|
|
||||||
tristate
|
|
||||||
prompt "Configure TLS (Thread Local Storage)"
|
|
||||||
default m
|
|
||||||
help
|
|
||||||
Specify that the target supports TLS (Thread Local Storage). Usually
|
|
||||||
configure can correctly determine if TLS is supported. In cases where
|
|
||||||
it guesses incorrectly, TLS can be explicitly enabled or disabled.
|
|
||||||
This can happen if the assembler supports TLS but the C library does
|
|
||||||
not, or if the assumptions made by the configure test are incorrect.
|
|
||||||
|
|
||||||
Option | TLS use | Associated ./configure switch
|
|
||||||
---------+--------------------+--------------------------------
|
|
||||||
Y | forcibly used | --enable-tls
|
|
||||||
M | auto | (none, ./configure decides)
|
|
||||||
N | forcibly not used | --disable-tls
|
|
||||||
|
|
||||||
If unsure, say 'M'.
|
|
||||||
|
|
||||||
#-----------------------------------------------------------------------------
|
|
||||||
# Optimisation features
|
|
||||||
|
|
||||||
comment "Optimisation features"
|
|
||||||
|
|
||||||
# Defined in config/cc/gcc.in
|
|
||||||
# For graphite: gcc needs cloog and isl
|
|
||||||
# In >= gcc-5.x, cloog is no longer needed, but isl is.
|
|
||||||
# Prompt in config/cc/gcc.in.2
|
|
||||||
config CC_GCC_USE_GRAPHITE
|
|
||||||
bool "Enable GRAPHITE loop optimisations"
|
|
||||||
default y
|
|
||||||
select CLOOG_NEEDED if !GCC_5_or_later
|
|
||||||
select ISL_NEEDED
|
|
||||||
help
|
|
||||||
Enable the GRAPHITE loop optimsations.
|
|
||||||
|
|
||||||
On some systems (eg. Cygwin), CLooG and ISL (required to enable
|
|
||||||
GRAPHITE) may not build properly (yet), so you'll have to say 'N'
|
|
||||||
here (or help debug the issues)
|
|
||||||
|
|
||||||
TODO: Is this still true on Cygwin?
|
|
||||||
|
|
||||||
# The way LTO works is a bit twisted.
|
|
||||||
# See: http://gcc.gnu.org/wiki/LinkTimeOptimization#Requirements
|
|
||||||
# Basically:
|
|
||||||
# - if binutils has plugins: LTO is handled by ld/gold by loading
|
|
||||||
# the plugin when linking
|
|
||||||
# - if binutils does not have plugins: LTO is handled by collect2
|
|
||||||
# In any case, LTO support does not depend on plugins, but takes
|
|
||||||
# advantage of it
|
|
||||||
config CC_GCC_USE_LTO
|
|
||||||
bool "Enable LTO"
|
|
||||||
default y
|
|
||||||
depends on ! STATIC_TOOLCHAIN
|
|
||||||
help
|
|
||||||
Enable the Link Time Optimisations.
|
|
||||||
|
|
||||||
#-----------------------------------------------------------------------------
|
|
||||||
comment "Settings for libraries running on target"
|
|
||||||
|
|
||||||
config CC_GCC_ENABLE_TARGET_OPTSPACE
|
|
||||||
bool
|
|
||||||
prompt "Optimize gcc libs for size"
|
|
||||||
default y
|
|
||||||
help
|
|
||||||
Pass --enable-target-optspace to crossgcc's configure.
|
|
||||||
|
|
||||||
This will compile crossgcc's libs with -Os.
|
|
||||||
|
|
||||||
config CC_GCC_LIBMUDFLAP
|
|
||||||
bool
|
|
||||||
prompt "Compile libmudflap"
|
|
||||||
help
|
|
||||||
libmudflap is a pointer-use checking tool, which can detect
|
|
||||||
various mis-usages of pointers in C and (to some extents) C++.
|
|
||||||
|
|
||||||
You should say 'N' here, as libmduflap generates instrumented
|
|
||||||
code (thus it is a bit bigger and a bit slower) and requires
|
|
||||||
re-compilation and re-link, while it exists better run-time
|
|
||||||
alternatives (eg. DUMA, dmalloc...) that need neither re-
|
|
||||||
compilation nor re-link.
|
|
||||||
|
|
||||||
config CC_GCC_LIBGOMP
|
|
||||||
bool
|
|
||||||
prompt "Compile libgomp"
|
|
||||||
depends on !THREADS_NONE
|
|
||||||
help
|
|
||||||
libgomp is "the GNU implementation of the OpenMP Application Programming
|
|
||||||
Interface (API) for multi-platform shared-memory parallel programming in
|
|
||||||
C/C++ and Fortran". See:
|
|
||||||
http://gcc.gnu.org/onlinedocs/libgomp/
|
|
||||||
|
|
||||||
GNU OpenMP support requires threading.
|
|
||||||
|
|
||||||
The default is 'N'. Say 'Y' if you need it, and report success/failure.
|
|
||||||
|
|
||||||
config CC_GCC_LIBSSP
|
|
||||||
bool
|
|
||||||
prompt "Compile libssp"
|
|
||||||
help
|
|
||||||
libssp is the run-time Stack-Smashing Protection library.
|
|
||||||
|
|
||||||
The default is 'N'. Say 'Y' if you need it, and report success/failure.
|
|
||||||
|
|
||||||
config CC_GCC_LIBQUADMATH
|
|
||||||
bool
|
|
||||||
prompt "Compile libquadmath"
|
|
||||||
help
|
|
||||||
libquadmath is a library which provides quad-precision mathematical
|
|
||||||
functions on targets supporting the __float128 datatype. See:
|
|
||||||
http://gcc.gnu.org/onlinedocs/libquadmath/
|
|
||||||
|
|
||||||
The default is 'N'. Say 'Y' if you need it, and report success/failure.
|
|
||||||
|
|
||||||
config CC_GCC_LIBSANITIZER
|
|
||||||
bool
|
|
||||||
prompt "Compile libsanitizer"
|
|
||||||
depends on THREADS_NATIVE
|
|
||||||
depends on ! LIBC_uClibc && ! LIBC_musl # Currently lacks required headers (like netrom.h)
|
|
||||||
help
|
|
||||||
libsanitizer is a library which provides run-time sanitising of either
|
|
||||||
or both of:
|
|
||||||
- memory access patterns (out-of-bonds, use-after-free)
|
|
||||||
- racy data accesses (in multi-threaded programs)
|
|
||||||
|
|
||||||
The default is 'N'. Say 'Y' if you need it, and report success/failure.
|
|
||||||
|
|
||||||
config CC_GCC_LIBMPX
|
|
||||||
bool
|
|
||||||
default y
|
|
||||||
prompt "Compile libmpx"
|
|
||||||
depends on CC_GCC_HAS_LIBMPX
|
|
||||||
depends on ARCH_x86
|
|
||||||
# MUSL does not define libc types that GCC requires. Mingw lacks certain headers.
|
|
||||||
depends on !LIBC_musl && ! LIBC_mingw
|
|
||||||
help
|
|
||||||
Enable GCC support for Intel Memory Protection Extensions (MPX).
|
|
||||||
|
|
||||||
#-----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
comment "Misc. obscure options."
|
|
||||||
|
|
||||||
config CC_CXA_ATEXIT
|
|
||||||
bool
|
|
||||||
prompt "Use __cxa_atexit"
|
|
||||||
default y
|
|
||||||
depends on ! BARE_METAL || LIBC_PROVIDES_CXA_ATEXIT
|
|
||||||
help
|
|
||||||
If you get the missing symbol "__cxa_atexit" when building C++ programs,
|
|
||||||
you might want to try disabling this option.
|
|
||||||
|
|
||||||
config CC_GCC_DISABLE_PCH
|
|
||||||
bool
|
|
||||||
prompt "Do not build PCH"
|
|
||||||
help
|
|
||||||
Say 'y' here to not use Pre-Compiled Headers in the resulting toolchain.
|
|
||||||
at the expense of speed when compiling C++ code.
|
|
||||||
|
|
||||||
For some configurations (most notably canadian?), PCH are broken, and
|
|
||||||
need to be disabled. Please see:
|
|
||||||
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40974
|
|
||||||
|
|
||||||
config CC_GCC_SJLJ_EXCEPTIONS
|
|
||||||
tristate
|
|
||||||
prompt "Use sjlj for exceptions"
|
|
||||||
depends on ! BARE_METAL
|
|
||||||
default m
|
|
||||||
help
|
|
||||||
'sjlj' is short for setjmp/longjmp.
|
|
||||||
|
|
||||||
On some architectures, stack unwinding during exception handling
|
|
||||||
works perfectly well without using sjlj, while on some others,
|
|
||||||
use of sjlj is required for proper stack unwinding.
|
|
||||||
|
|
||||||
Option | sjlj use | Associated ./configure switch
|
|
||||||
---------+--------------------+--------------------------------
|
|
||||||
Y | forcibly used | --enable-sjlj-exceptions
|
|
||||||
M | auto | (none, ./configure decides)
|
|
||||||
N | forcibly not used | --disable-sjlj-exceptions
|
|
||||||
|
|
||||||
It should be safe to say 'M' or 'N'.
|
|
||||||
|
|
||||||
It can happen that ./configure is wrong in some cases. Known
|
|
||||||
case is for ARM big endian, where you should say 'N'.
|
|
||||||
|
|
||||||
config CC_GCC_LDBL_128
|
|
||||||
tristate
|
|
||||||
prompt "Enable 128-bit long doubles"
|
|
||||||
default m
|
|
||||||
help
|
|
||||||
Saying 'Y' will force gcc to use 128-bit wide long doubles
|
|
||||||
Saying 'N' will force gcc to use 64-bit wide long doubles
|
|
||||||
Saying 'M' will let gcc choose (default is 128-bit for
|
|
||||||
glibc >= 2.4, 64-bit otherwise)
|
|
||||||
|
|
||||||
If in doubt, keep the default, ie. 'M'.
|
|
||||||
|
|
||||||
config CC_GCC_BUILD_ID
|
|
||||||
bool
|
|
||||||
prompt "Enable build-id"
|
|
||||||
help
|
|
||||||
Tells GCC to pass --build-id option to the linker for all final
|
|
||||||
links (links performed without the -r or --relocatable option),
|
|
||||||
if the linker supports it. If you say 'y' here, but your linker
|
|
||||||
does not support --build-id option, a warning is issued and this
|
|
||||||
option is ignored.
|
|
||||||
|
|
||||||
The default is off.
|
|
||||||
|
|
||||||
choice CC_GCC_LNK_HASH_STYLE_CHOICE
|
|
||||||
bool
|
|
||||||
prompt "linker hash style"
|
|
||||||
depends on BINUTILS_HAS_HASH_STYLE
|
|
||||||
|
|
||||||
config CC_GCC_LNK_HASH_STYLE_DEFAULT
|
|
||||||
bool
|
|
||||||
prompt "Default"
|
|
||||||
help
|
|
||||||
Do not specify any value, and use the default value (sysv).
|
|
||||||
|
|
||||||
config CC_GCC_LNK_HASH_STYLE_SYSV
|
|
||||||
bool
|
|
||||||
prompt "sysv"
|
|
||||||
help
|
|
||||||
Force use of the SYSV hash style.
|
|
||||||
|
|
||||||
config CC_GCC_LNK_HASH_STYLE_GNU
|
|
||||||
bool
|
|
||||||
prompt "gnu"
|
|
||||||
help
|
|
||||||
Force use of the GNU hash style.
|
|
||||||
|
|
||||||
config CC_GCC_LNK_HASH_STYLE_BOTH
|
|
||||||
bool
|
|
||||||
prompt "both"
|
|
||||||
help
|
|
||||||
Force use of both hash styles.
|
|
||||||
|
|
||||||
endchoice # CC_GCC_LNK_HASH_STYLE_CHOICE
|
|
||||||
|
|
||||||
config CC_GCC_LNK_HASH_STYLE
|
|
||||||
string
|
|
||||||
default "" if CC_GCC_LNK_HASH_STYLE_DEFAULT
|
|
||||||
default "sysv" if CC_GCC_LNK_HASH_STYLE_SYSV
|
|
||||||
default "gnu" if CC_GCC_LNK_HASH_STYLE_GNU
|
|
||||||
default "both" if CC_GCC_LNK_HASH_STYLE_BOTH
|
|
||||||
|
|
||||||
choice CC_GCC_DEC_FLOATS_CHOICE
|
|
||||||
bool "Decimal floats"
|
|
||||||
default CC_GCC_DEC_FLOATS_AUTO
|
|
||||||
help
|
|
||||||
Choose what type of decimal floats to support.
|
|
||||||
|
|
||||||
Note that using decimal floats requires a C library that provides
|
|
||||||
support for fenv (namely, the fenv.h header). This is the case
|
|
||||||
for (e)glibc, and uClibc on x86/32. For other C libraries, or
|
|
||||||
uClibc on other archs, this might not be the case, so you should
|
|
||||||
disable support for decimal floats.
|
|
||||||
|
|
||||||
The default is to let ./configure decide.
|
|
||||||
|
|
||||||
config CC_GCC_DEC_FLOAT_AUTO
|
|
||||||
bool "auto"
|
|
||||||
help
|
|
||||||
Let ./configure decide. If you say 'y' here, gcc will default to:
|
|
||||||
- 'bid' for x86 (32- and 64-bit)
|
|
||||||
- 'dpd' for powerpc
|
|
||||||
- 'no' for the other architectures
|
|
||||||
|
|
||||||
config CC_GCC_DEC_FLOAT_BID
|
|
||||||
bool "bid"
|
|
||||||
help
|
|
||||||
Use the 'binary integer decimal' format for decimal floats.
|
|
||||||
|
|
||||||
config CC_GCC_DEC_FLOAT_DPD
|
|
||||||
bool "dpd"
|
|
||||||
help
|
|
||||||
Use the 'densely packed decimal' for decimal floats.
|
|
||||||
|
|
||||||
config CC_GCC_DEC_FLOATS_NO
|
|
||||||
bool "no"
|
|
||||||
help
|
|
||||||
Do not support decimal floats. The default.
|
|
||||||
|
|
||||||
endchoice # CC_GCC_DEC_FLOATS_CHOICE
|
|
||||||
|
|
||||||
config CC_GCC_DEC_FLOATS
|
|
||||||
string
|
|
||||||
default "" if CC_GCC_DEC_FLOATS_AUTO
|
|
||||||
default "bid" if CC_GCC_DEC_FLOATS_BID
|
|
||||||
default "dpd" if CC_GCC_DEC_FLOATS_DPD
|
|
||||||
default "no" if CC_GCC_DEC_FLOATS_NO
|
|
||||||
|
|
||||||
#-----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
config CC_GCC_HAS_ARCH_OPTIONS
|
|
||||||
bool
|
|
||||||
|
|
||||||
comment "archictecture-specific options"
|
|
||||||
depends on CC_GCC_HAS_ARCH_OPTIONS
|
|
||||||
|
|
||||||
if ARCH_mips
|
|
||||||
source "config/cc/gcc.in.mips"
|
|
||||||
endif # ARCH_mips
|
|
@ -136,47 +136,47 @@ config ZLIB
|
|||||||
# For now, just have comments delineating the libs.
|
# For now, just have comments delineating the libs.
|
||||||
if ZLIB
|
if ZLIB
|
||||||
comment "zlib options"
|
comment "zlib options"
|
||||||
source "config/companion_libs/zlib.in"
|
source "config/comp_libs/zlib.in"
|
||||||
endif
|
endif
|
||||||
if LIBICONV
|
if LIBICONV
|
||||||
comment "libiconv options"
|
comment "libiconv options"
|
||||||
source "config/companion_libs/libiconv.in"
|
source "config/comp_libs/libiconv.in"
|
||||||
endif
|
endif
|
||||||
if GETTEXT
|
if GETTEXT
|
||||||
comment "gettext options"
|
comment "gettext options"
|
||||||
source "config/companion_libs/gettext.in"
|
source "config/comp_libs/gettext.in"
|
||||||
endif
|
endif
|
||||||
if GMP
|
if GMP
|
||||||
comment "GMP options"
|
comment "GMP options"
|
||||||
source "config/companion_libs/gmp.in"
|
source "config/comp_libs/gmp.in"
|
||||||
endif
|
endif
|
||||||
if MPFR
|
if MPFR
|
||||||
comment "MPFR options"
|
comment "MPFR options"
|
||||||
source "config/companion_libs/mpfr.in"
|
source "config/comp_libs/mpfr.in"
|
||||||
endif
|
endif
|
||||||
if ISL
|
if ISL
|
||||||
comment "ISL options"
|
comment "ISL options"
|
||||||
source "config/companion_libs/isl.in"
|
source "config/comp_libs/isl.in"
|
||||||
endif
|
endif
|
||||||
if CLOOG
|
if CLOOG
|
||||||
comment "CLooG options"
|
comment "CLooG options"
|
||||||
source "config/companion_libs/cloog.in"
|
source "config/comp_libs/cloog.in"
|
||||||
endif
|
endif
|
||||||
if MPC
|
if MPC
|
||||||
comment "MPC options"
|
comment "MPC options"
|
||||||
source "config/companion_libs/mpc.in"
|
source "config/comp_libs/mpc.in"
|
||||||
endif
|
endif
|
||||||
if LIBELF || LIBELF_TARGET
|
if LIBELF || LIBELF_TARGET
|
||||||
comment "libelf options"
|
comment "libelf options"
|
||||||
source "config/companion_libs/libelf.in"
|
source "config/comp_libs/libelf.in"
|
||||||
endif
|
endif
|
||||||
if EXPAT || EXPAT_TARGET
|
if EXPAT || EXPAT_TARGET
|
||||||
comment "expat options"
|
comment "expat options"
|
||||||
source "config/companion_libs/expat.in"
|
source "config/comp_libs/expat.in"
|
||||||
endif
|
endif
|
||||||
if NCURSES || NCURSES_TARGET
|
if NCURSES || NCURSES_TARGET
|
||||||
comment "ncurses options"
|
comment "ncurses options"
|
||||||
source "config/companion_libs/ncurses.in"
|
source "config/comp_libs/ncurses.in"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if COMPLIBS
|
if COMPLIBS
|
@ -10,6 +10,6 @@ config COMP_TOOLS_FOR_HOST
|
|||||||
tools into the final toolchain (rather than just using them
|
tools into the final toolchain (rather than just using them
|
||||||
to build it).
|
to build it).
|
||||||
|
|
||||||
source "config/gen/companion_tools.in"
|
source "config/gen/comp_tools.in"
|
||||||
|
|
||||||
endmenu
|
endmenu
|
@ -7,6 +7,6 @@ source "config/binutils.in"
|
|||||||
source "config/libc.in"
|
source "config/libc.in"
|
||||||
source "config/cc.in"
|
source "config/cc.in"
|
||||||
source "config/debug.in"
|
source "config/debug.in"
|
||||||
source "config/companion_libs.in"
|
source "config/comp_libs.in"
|
||||||
source "config/companion_tools.in"
|
source "config/comp_tools.in"
|
||||||
source "config/test_suite.in"
|
source "config/test_suite.in"
|
||||||
|
@ -33,6 +33,4 @@ config SHARED_LIBS
|
|||||||
You might not want shared libraries if you're building for a target that
|
You might not want shared libraries if you're building for a target that
|
||||||
don't support it (maybe some nommu targets, for example, or bare metal).
|
don't support it (maybe some nommu targets, for example, or bare metal).
|
||||||
|
|
||||||
source "config/gen/kernel.in.2"
|
|
||||||
|
|
||||||
endmenu
|
endmenu
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
## depends on ! ARCH_avr
|
## depends on ! ARCH_avr
|
||||||
## select KERNEL_SUPPORTS_SHARED_LIBS
|
## select KERNEL_SUPPORTS_SHARED_LIBS
|
||||||
##
|
|
||||||
## help Build a toolchain targeting systems running Linux as a kernel.
|
## help Build a toolchain targeting systems running Linux as a kernel.
|
||||||
|
|
||||||
# GLIBC and kernel are special when it comes to obsoletion. Users
|
# GLIBC and kernel are special when it comes to obsoletion. Users
|
||||||
@ -13,3 +13,42 @@
|
|||||||
# Such pinned versions are indicated in version.desc files with a comment.
|
# Such pinned versions are indicated in version.desc files with a comment.
|
||||||
|
|
||||||
source "config/versions/linux.in"
|
source "config/versions/linux.in"
|
||||||
|
|
||||||
|
choice
|
||||||
|
bool
|
||||||
|
prompt "Kernel verbosity:"
|
||||||
|
default KERNEL_LINUX_VERBOSITY_0
|
||||||
|
|
||||||
|
config KERNEL_LINUX_VERBOSITY_0
|
||||||
|
bool
|
||||||
|
prompt "Simplified"
|
||||||
|
help
|
||||||
|
Print simplified command lines.
|
||||||
|
|
||||||
|
config KERNEL_LINUX_VERBOSITY_1
|
||||||
|
bool
|
||||||
|
prompt "Full commands"
|
||||||
|
help
|
||||||
|
Print full command lines.
|
||||||
|
|
||||||
|
config KERNEL_LINUX_VERBOSITY_2
|
||||||
|
bool
|
||||||
|
prompt "Exec reasons"
|
||||||
|
help
|
||||||
|
Print the reasons why a make target is rebuild.
|
||||||
|
|
||||||
|
endchoice
|
||||||
|
|
||||||
|
config KERNEL_LINUX_VERBOSE_LEVEL
|
||||||
|
int
|
||||||
|
default 0 if KERNEL_LINUX_VERBOSITY_0
|
||||||
|
default 1 if KERNEL_LINUX_VERBOSITY_1
|
||||||
|
default 2 if KERNEL_LINUX_VERBOSITY_2
|
||||||
|
|
||||||
|
config KERNEL_LINUX_INSTALL_CHECK
|
||||||
|
bool
|
||||||
|
prompt "Check installed headers"
|
||||||
|
default y
|
||||||
|
help
|
||||||
|
If you are in doubt that installed headers are buggy, say 'Y'
|
||||||
|
here to have an extra check passed onto the headers.
|
||||||
|
@ -1,40 +0,0 @@
|
|||||||
# Linux kernel options
|
|
||||||
|
|
||||||
choice
|
|
||||||
bool
|
|
||||||
prompt "Kernel verbosity:"
|
|
||||||
default KERNEL_LINUX_VERBOSITY_0
|
|
||||||
|
|
||||||
config KERNEL_LINUX_VERBOSITY_0
|
|
||||||
bool
|
|
||||||
prompt "Simplified"
|
|
||||||
help
|
|
||||||
Print simplified command lines.
|
|
||||||
|
|
||||||
config KERNEL_LINUX_VERBOSITY_1
|
|
||||||
bool
|
|
||||||
prompt "Full commands"
|
|
||||||
help
|
|
||||||
Print full command lines.
|
|
||||||
|
|
||||||
config KERNEL_LINUX_VERBOSITY_2
|
|
||||||
bool
|
|
||||||
prompt "Exec reasons"
|
|
||||||
help
|
|
||||||
Print the reasons why a make target is rebuild.
|
|
||||||
|
|
||||||
endchoice
|
|
||||||
|
|
||||||
config KERNEL_LINUX_VERBOSE_LEVEL
|
|
||||||
int
|
|
||||||
default 0 if KERNEL_LINUX_VERBOSITY_0
|
|
||||||
default 1 if KERNEL_LINUX_VERBOSITY_1
|
|
||||||
default 2 if KERNEL_LINUX_VERBOSITY_2
|
|
||||||
|
|
||||||
config KERNEL_LINUX_INSTALL_CHECK
|
|
||||||
bool
|
|
||||||
prompt "Check installed headers"
|
|
||||||
default y
|
|
||||||
help
|
|
||||||
If you are in doubt that installed headers are buggy, say 'Y'
|
|
||||||
here to have an extra check passed onto the headers.
|
|
@ -106,8 +106,6 @@ config LIBC_XLDD
|
|||||||
for the native ldd. Please see the help, by running it
|
for the native ldd. Please see the help, by running it
|
||||||
with '--help' for more explanations.
|
with '--help' for more explanations.
|
||||||
|
|
||||||
source "config/gen/libc.in.2"
|
|
||||||
|
|
||||||
endif # ! LIBC_none
|
endif # ! LIBC_none
|
||||||
|
|
||||||
endmenu
|
endmenu
|
||||||
|
@ -10,3 +10,10 @@
|
|||||||
## help provides the basic startup code needed by most applications.
|
## help provides the basic startup code needed by most applications.
|
||||||
|
|
||||||
source "config/versions/avr-libc.in"
|
source "config/versions/avr-libc.in"
|
||||||
|
|
||||||
|
config LIBC_AVR_LIBC_EXTRA_CONFIG_ARRAY
|
||||||
|
string
|
||||||
|
prompt "Extra config for avr-libc"
|
||||||
|
default ""
|
||||||
|
help
|
||||||
|
Extra flags to pass onto ./configure when configuring the avr-libc.
|
||||||
|
@ -1,8 +0,0 @@
|
|||||||
# avr-libc second-part options
|
|
||||||
|
|
||||||
config LIBC_AVR_LIBC_EXTRA_CONFIG_ARRAY
|
|
||||||
string
|
|
||||||
prompt "Extra config for avr-libc"
|
|
||||||
default ""
|
|
||||||
help
|
|
||||||
Extra flags to pass onto ./configure when configuring the avr-libc.
|
|
@ -1,16 +1,13 @@
|
|||||||
# glibc options
|
# This file contains the common configuration options
|
||||||
|
# that apply to both glibc.
|
||||||
# TBD move all the remaining parts into glibc.in.2 and move the sourcing of versions
|
|
||||||
# into the auto-generated choice/menus?
|
|
||||||
|
|
||||||
## depends on ! WINDOWS && ! BARE_METAL && ARCH_USE_MMU
|
## depends on ! WINDOWS && ! BARE_METAL && ARCH_USE_MMU
|
||||||
##
|
|
||||||
## select LIBC_SUPPORT_THREADS_NATIVE
|
## select LIBC_SUPPORT_THREADS_NATIVE
|
||||||
## select CC_CORE_PASSES_NEEDED
|
## select CC_CORE_PASSES_NEEDED
|
||||||
# TBD: select GETTEXT for build only, not for host
|
# TBD: select GETTEXT for build only, not for host
|
||||||
## select GETTEXT_NEEDED
|
## select GETTEXT_NEEDED
|
||||||
## select BINUTILS_FORCE_LD_BFD_DEFAULT
|
## select BINUTILS_FORCE_LD_BFD_DEFAULT
|
||||||
##
|
|
||||||
## help The de-facto standard for Linux distributions.
|
## help The de-facto standard for Linux distributions.
|
||||||
## help Feature-rich, but large... Most useful for desktop-like systems.
|
## help Feature-rich, but large... Most useful for desktop-like systems.
|
||||||
|
|
||||||
@ -23,3 +20,270 @@ source "config/versions/glibc.in"
|
|||||||
if GLIBC_USE_PORTS_EXTERNAL
|
if GLIBC_USE_PORTS_EXTERNAL
|
||||||
source "config/versions/glibc-ports.in"
|
source "config/versions/glibc-ports.in"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
config THREADS
|
||||||
|
default "nptl"
|
||||||
|
|
||||||
|
# Known add-ons and when they exist(ed)
|
||||||
|
# crypt external in 2.1, no longer an add-on since 2.2
|
||||||
|
# libidn external in 2.3.4 .. 2.10, still an add-on
|
||||||
|
# linuxthreads external in 2.0.1 .. 2.5, no longer available since 2.6 [*]
|
||||||
|
# localedata external in 2.0.1 .. 2.0.6, no longer an add-on since 2.1 [*]
|
||||||
|
# ports external in 2.3.4 .. 2.16, no longer an add-on since 2.20
|
||||||
|
# nptl never external, no longer an add-on since 2.20
|
||||||
|
#
|
||||||
|
# Given the list of currently supported glibc releases, we only need to worry about
|
||||||
|
# 'libidn', 'ports' and 'nptl' add-ons. Of these, only 'ports' can be an external
|
||||||
|
# tarball; and only 'libidn' is user-selectable ('ports' & 'nptl' are selected
|
||||||
|
# by crosstool-NG, as dictated by the architecture and thread model).
|
||||||
|
#
|
||||||
|
# I had trouble locating the sources in the repository for some of the released
|
||||||
|
# versions. E.g., there is a 2.5 version of linuxthreads, but the tag for 2.5 in Git
|
||||||
|
# does not have the linuxthreads directory at all. Similarly, 2.0.6 tag did not have
|
||||||
|
# localedata. Since these releases are no longer supported by crosstool-NG, this is
|
||||||
|
# of pure historical interest now, however.
|
||||||
|
|
||||||
|
config GLIBC_HAS_NPTL_ADDON
|
||||||
|
def_bool y
|
||||||
|
depends on !GLIBC_2_20_or_later
|
||||||
|
|
||||||
|
config GLIBC_HAS_PORTS_ADDON
|
||||||
|
def_bool y
|
||||||
|
depends on !GLIBC_2_20_or_later
|
||||||
|
|
||||||
|
config GLIBC_HAS_PORTS_ADDON_EXTERNAL
|
||||||
|
def_bool y
|
||||||
|
depends on !GLIBC_2_17_or_later
|
||||||
|
|
||||||
|
# In case it folds into main distribution in some future release, too
|
||||||
|
config GLIBC_HAS_LIBIDN_ADDON
|
||||||
|
def_bool y
|
||||||
|
|
||||||
|
# Some architectures require the ports addon. List them one by one here:
|
||||||
|
# This list must be carefully in sync with the architectures names
|
||||||
|
# we can find in config/arch/*
|
||||||
|
config GLIBC_USE_PORTS_ADDON
|
||||||
|
def_bool y
|
||||||
|
depends on ARCH_alpha || ARCH_arm || ARCH_m68k || ARCH_mips || ARCH_powerpc
|
||||||
|
depends on GLIBC_HAS_PORTS_ADDON
|
||||||
|
|
||||||
|
config GLIBC_USE_PORTS_EXTERNAL
|
||||||
|
def_bool y
|
||||||
|
depends on GLIBC_USE_PORTS_ADDON && GLIBC_HAS_PORTS_ADDON_EXTERNAL
|
||||||
|
|
||||||
|
config GLIBC_USE_NPTL_ADDON
|
||||||
|
def_bool y
|
||||||
|
depends on THREADS_NATIVE && GLIBC_HAS_NPTL_ADDON
|
||||||
|
|
||||||
|
config GLIBC_USE_LIBIDN_ADDON
|
||||||
|
bool "Build libidn add-on"
|
||||||
|
help
|
||||||
|
Enables the libidn add-on in GNU libc.
|
||||||
|
|
||||||
|
# SPARCv8 support retired in 2.23
|
||||||
|
config GLIBC_NO_SPARC_V8
|
||||||
|
def_bool y
|
||||||
|
depends on GLIBC_2_23_or_later
|
||||||
|
|
||||||
|
config GLIBC_EXTRA_CONFIG_ARRAY
|
||||||
|
string
|
||||||
|
prompt "extra config"
|
||||||
|
default ""
|
||||||
|
help
|
||||||
|
Extra flags to pass onto ./configure when configuring.
|
||||||
|
|
||||||
|
You can enter multiple arguments here, and arguments can contain spaces
|
||||||
|
if they are properly quoted (or escaped, but prefer quotes). Eg.:
|
||||||
|
--with-foo="1st arg with 4 spaces" --with-bar=2nd-arg-without-space
|
||||||
|
|
||||||
|
config GLIBC_CONFIGPARMS
|
||||||
|
string
|
||||||
|
prompt "Extra config params (READ HELP)"
|
||||||
|
default "" if ! ARCH_sh
|
||||||
|
default "no-z-defs=yes" if ARCH_sh
|
||||||
|
help
|
||||||
|
Some architectures need to set options in the file configparms.
|
||||||
|
This is the case for sh3/4, which really need to set configparms
|
||||||
|
to "no-z-defs=yes" as of gcc-3.4/glibc-2.3.2.
|
||||||
|
|
||||||
|
Unless you are building a toolchain for sh3/4, you should leave that empty.
|
||||||
|
|
||||||
|
Note: If you need to pass more than one value, separate them with
|
||||||
|
'\n'. Eg.: var1=val1\nvar2=val2
|
||||||
|
|
||||||
|
config GLIBC_EXTRA_CFLAGS
|
||||||
|
string
|
||||||
|
prompt "extra target CFLAGS"
|
||||||
|
default ""
|
||||||
|
help
|
||||||
|
Extra target CFLAGS to use when building.
|
||||||
|
|
||||||
|
config GLIBC_ENABLE_FORTIFIED_BUILD
|
||||||
|
bool
|
||||||
|
prompt "Enable fortified build (EXPERIMENTAL)"
|
||||||
|
depends on EXPERIMENTAL
|
||||||
|
help
|
||||||
|
If you say 'y' here, then glibc will be using fortified versions
|
||||||
|
of functions with format arguments (eg. vsyslog, printf...), and
|
||||||
|
do a sanity check on the format at runtime, to avoid some of the
|
||||||
|
common format string attacks.
|
||||||
|
|
||||||
|
This is currently not supported, and will most probably result in
|
||||||
|
a broken build, with an error message like:
|
||||||
|
../misc/syslog.c: In function '__vsyslog_chk':
|
||||||
|
../misc/syslog.c:123: sorry, unimplemented: inlining failed in
|
||||||
|
call to 'syslog': function body not available
|
||||||
|
|
||||||
|
If you are brave enough and want to debug the issue, then say 'y'
|
||||||
|
here. Otherwise, be still and say 'n' (the default). ;-)
|
||||||
|
|
||||||
|
|
||||||
|
config GLIBC_DISABLE_VERSIONING
|
||||||
|
bool
|
||||||
|
prompt "Disable symbols versioning"
|
||||||
|
help
|
||||||
|
Do not include versioning information in the library objects.
|
||||||
|
|
||||||
|
config GLIBC_OLDEST_ABI
|
||||||
|
string
|
||||||
|
prompt "Oldest supported ABI"
|
||||||
|
default ""
|
||||||
|
help
|
||||||
|
Set the oldest ABI supported by the C library.
|
||||||
|
|
||||||
|
Setting this option, for example, to 2.2 will provide ABI support
|
||||||
|
back to (e)glibc-2.2.
|
||||||
|
|
||||||
|
If this option is not set, (e)glibc will choose for you.
|
||||||
|
|
||||||
|
config GLIBC_FORCE_UNWIND
|
||||||
|
bool
|
||||||
|
prompt "Force unwind support (READ HELP!)"
|
||||||
|
default y
|
||||||
|
help
|
||||||
|
If your toolchain fails building while building the C library
|
||||||
|
start files, or the complete C library, with a message like:
|
||||||
|
configure: error: forced unwind support is required
|
||||||
|
|
||||||
|
then you may try changing this option. Otherwise, leave it to
|
||||||
|
the default 'y'.
|
||||||
|
|
||||||
|
The issue seems to be related to building NPTL on old versions
|
||||||
|
of glibc on some architectures
|
||||||
|
(seen on s390, s390x and x86_64).
|
||||||
|
|
||||||
|
config GLIBC_LOCALES
|
||||||
|
bool
|
||||||
|
prompt "Build and install locales"
|
||||||
|
help
|
||||||
|
Whether to build and install the libc locale files for the target,
|
||||||
|
which is required in order to support internationalization.
|
||||||
|
|
||||||
|
if LIBC_glibc && GLIBC_LOCALES
|
||||||
|
comment "WARNING! "
|
||||||
|
comment "| The built locales will be usable if and only if the build "
|
||||||
|
comment "| machine and the target: "
|
||||||
|
comment "| - have the same endianness, "
|
||||||
|
comment "| - and have the same alignment requirements for uint32_t. "
|
||||||
|
comment "| You will have to check by yourself (for now). "
|
||||||
|
comment "WARNING! "
|
||||||
|
comment "| Building GLIBC locales requires that GLIBC supports "
|
||||||
|
comment "| the build machine as the target. "
|
||||||
|
endif # LIBC_glibc && GLIBC_LOCALES
|
||||||
|
|
||||||
|
if KERNEL_linux
|
||||||
|
|
||||||
|
choice GLIBC_SUPPORTED_KERNEL
|
||||||
|
bool
|
||||||
|
prompt "Minimum supported kernel version"
|
||||||
|
default GLIBC_KERNEL_VERSION_AS_HEADERS
|
||||||
|
|
||||||
|
config GLIBC_KERNEL_VERSION_NONE
|
||||||
|
bool
|
||||||
|
prompt "Let ./configure decide"
|
||||||
|
help
|
||||||
|
Let ./configure decide what minimum kernel version glibc will be
|
||||||
|
able to run against.
|
||||||
|
|
||||||
|
This will include legacy compatibility code for older kernels in
|
||||||
|
the C library, thus ensuring that it will run on a large number
|
||||||
|
of old kernels.
|
||||||
|
|
||||||
|
The minimum kernel version supported will be dependent upon the
|
||||||
|
target you build for. For example:
|
||||||
|
alpha*-*-linux-gnu Requires Linux 2.6.9 for NPTL
|
||||||
|
sh[34]-*-linux-gnu Requires Linux 2.6.11
|
||||||
|
powerpc* Requires Linux 2.4.19
|
||||||
|
arm*-*-linux-*gnueabi Requires Linux 2.6.16
|
||||||
|
|
||||||
|
config GLIBC_KERNEL_VERSION_AS_HEADERS
|
||||||
|
bool
|
||||||
|
prompt "Same as kernel headers (default)"
|
||||||
|
help
|
||||||
|
Normally, you'll want glibc to run against the same kernel
|
||||||
|
version as the one used for the headers.
|
||||||
|
|
||||||
|
This is the default.
|
||||||
|
|
||||||
|
If enabled, crosstool-ng will use the chosen version of kernel
|
||||||
|
headers for the glibc minimum kernel version supported, which is
|
||||||
|
what gets passed to "--enable-kernel=" when configuring glibc.
|
||||||
|
|
||||||
|
Enabling this will ensure that no legacy compatibility code for
|
||||||
|
older kernels is built into your C libraries, but it will
|
||||||
|
be unable to run on kernel versions older than whichever kernel
|
||||||
|
headers version you've built the toolchain for.
|
||||||
|
|
||||||
|
If you know for sure that your toolchain will never need to build
|
||||||
|
applications that will run under a kernel version older than your
|
||||||
|
chosen kernel headers version (CT_KERNEL_VERSION), you can choose
|
||||||
|
"y" here.
|
||||||
|
|
||||||
|
config GLIBC_KERNEL_VERSION_CHOSEN
|
||||||
|
bool
|
||||||
|
prompt "Specific kernel version"
|
||||||
|
help
|
||||||
|
Specify the earliest Linux kernel version you want glibc to
|
||||||
|
include support for. This does not have to match the kernel
|
||||||
|
headers version used for your toolchain. This controls what is
|
||||||
|
passed to the "--enable-kernel=" option to the glibc configure
|
||||||
|
script.
|
||||||
|
|
||||||
|
If you want to be able to statically link programs with your
|
||||||
|
toolchain's C library, make sure this kernel version is lower than
|
||||||
|
all kernels you wish to support to avoid "FATAL: kernel too old"
|
||||||
|
errors. The higher the version you specify, the less legacy code
|
||||||
|
will be built into libc.
|
||||||
|
|
||||||
|
Most people can leave this at the default value of "2.6.9".
|
||||||
|
|
||||||
|
if GLIBC_KERNEL_VERSION_CHOSEN
|
||||||
|
|
||||||
|
config GLIBC_MIN_KERNEL_VERSION
|
||||||
|
string
|
||||||
|
prompt "Minimum kernel version to support"
|
||||||
|
default "2.6.9"
|
||||||
|
help
|
||||||
|
Enter here the lowest kernel version glibc will be able to run against.
|
||||||
|
|
||||||
|
The minimum kernel version supported will be dependent upon the
|
||||||
|
target you build for. For example:
|
||||||
|
alpha*-*-linux-gnu Requires Linux 2.6.9 for NPTL
|
||||||
|
sh[34]-*-linux-gnu Requires Linux 2.6.11
|
||||||
|
powerpc* Requires Linux 2.4.19
|
||||||
|
arm*-*-linux-*gnueabi Requires Linux 2.6.16
|
||||||
|
|
||||||
|
Note that no sanity check is performed by crosstool-NG to ensure
|
||||||
|
that the value you enter here is appropriate for your target.
|
||||||
|
|
||||||
|
endif # GLIBC_KERNEL_VERSION_CHOSEN
|
||||||
|
|
||||||
|
endchoice
|
||||||
|
|
||||||
|
config GLIBC_MIN_KERNEL
|
||||||
|
string
|
||||||
|
default "" if GLIBC_KERNEL_VERSION_NONE
|
||||||
|
default LINUX_VERSION if GLIBC_KERNEL_VERSION_AS_HEADERS
|
||||||
|
default GLIBC_MIN_KERNEL_VERSION if GLIBC_KERNEL_VERSION_CHOSEN
|
||||||
|
|
||||||
|
endif # KERNEL_linux
|
||||||
|
@ -1,269 +0,0 @@
|
|||||||
# This file contains the common configuration options
|
|
||||||
# that apply to both glibc.
|
|
||||||
|
|
||||||
config THREADS
|
|
||||||
default "nptl"
|
|
||||||
|
|
||||||
# Known add-ons and when they exist(ed)
|
|
||||||
# crypt external in 2.1, no longer an add-on since 2.2
|
|
||||||
# libidn external in 2.3.4 .. 2.10, still an add-on
|
|
||||||
# linuxthreads external in 2.0.1 .. 2.5, no longer available since 2.6 [*]
|
|
||||||
# localedata external in 2.0.1 .. 2.0.6, no longer an add-on since 2.1 [*]
|
|
||||||
# ports external in 2.3.4 .. 2.16, no longer an add-on since 2.20
|
|
||||||
# nptl never external, no longer an add-on since 2.20
|
|
||||||
#
|
|
||||||
# Given the list of currently supported glibc releases, we only need to worry about
|
|
||||||
# 'libidn', 'ports' and 'nptl' add-ons. Of these, only 'ports' can be an external
|
|
||||||
# tarball; and only 'libidn' is user-selectable ('ports' & 'nptl' are selected
|
|
||||||
# by crosstool-NG, as dictated by the architecture and thread model).
|
|
||||||
#
|
|
||||||
# I had trouble locating the sources in the repository for some of the released
|
|
||||||
# versions. E.g., there is a 2.5 version of linuxthreads, but the tag for 2.5 in Git
|
|
||||||
# does not have the linuxthreads directory at all. Similarly, 2.0.6 tag did not have
|
|
||||||
# localedata. Since these releases are no longer supported by crosstool-NG, this is
|
|
||||||
# of pure historical interest now, however.
|
|
||||||
|
|
||||||
config GLIBC_HAS_NPTL_ADDON
|
|
||||||
def_bool y
|
|
||||||
depends on !GLIBC_2_20_or_later
|
|
||||||
|
|
||||||
config GLIBC_HAS_PORTS_ADDON
|
|
||||||
def_bool y
|
|
||||||
depends on !GLIBC_2_20_or_later
|
|
||||||
|
|
||||||
config GLIBC_HAS_PORTS_ADDON_EXTERNAL
|
|
||||||
def_bool y
|
|
||||||
depends on !GLIBC_2_17_or_later
|
|
||||||
|
|
||||||
# In case it folds into main distribution in some future release, too
|
|
||||||
config GLIBC_HAS_LIBIDN_ADDON
|
|
||||||
def_bool y
|
|
||||||
|
|
||||||
# Some architectures require the ports addon. List them one by one here:
|
|
||||||
# This list must be carefully in sync with the architectures names
|
|
||||||
# we can find in config/arch/*
|
|
||||||
config GLIBC_USE_PORTS_ADDON
|
|
||||||
def_bool y
|
|
||||||
depends on ARCH_alpha || ARCH_arm || ARCH_m68k || ARCH_mips || ARCH_powerpc
|
|
||||||
depends on GLIBC_HAS_PORTS_ADDON
|
|
||||||
|
|
||||||
config GLIBC_USE_PORTS_EXTERNAL
|
|
||||||
def_bool y
|
|
||||||
depends on GLIBC_USE_PORTS_ADDON && GLIBC_HAS_PORTS_ADDON_EXTERNAL
|
|
||||||
|
|
||||||
config GLIBC_USE_NPTL_ADDON
|
|
||||||
def_bool y
|
|
||||||
depends on THREADS_NATIVE && GLIBC_HAS_NPTL_ADDON
|
|
||||||
|
|
||||||
config GLIBC_USE_LIBIDN_ADDON
|
|
||||||
bool "Build libidn add-on"
|
|
||||||
help
|
|
||||||
Enables the libidn add-on in GNU libc.
|
|
||||||
|
|
||||||
# SPARCv8 support retired in 2.23
|
|
||||||
config GLIBC_NO_SPARC_V8
|
|
||||||
def_bool y
|
|
||||||
depends on GLIBC_2_23_or_later
|
|
||||||
|
|
||||||
config GLIBC_EXTRA_CONFIG_ARRAY
|
|
||||||
string
|
|
||||||
prompt "extra config"
|
|
||||||
default ""
|
|
||||||
help
|
|
||||||
Extra flags to pass onto ./configure when configuring.
|
|
||||||
|
|
||||||
You can enter multiple arguments here, and arguments can contain spaces
|
|
||||||
if they are properly quoted (or escaped, but prefer quotes). Eg.:
|
|
||||||
--with-foo="1st arg with 4 spaces" --with-bar=2nd-arg-without-space
|
|
||||||
|
|
||||||
config GLIBC_CONFIGPARMS
|
|
||||||
string
|
|
||||||
prompt "Extra config params (READ HELP)"
|
|
||||||
default "" if ! ARCH_sh
|
|
||||||
default "no-z-defs=yes" if ARCH_sh
|
|
||||||
help
|
|
||||||
Some architectures need to set options in the file configparms.
|
|
||||||
This is the case for sh3/4, which really need to set configparms
|
|
||||||
to "no-z-defs=yes" as of gcc-3.4/glibc-2.3.2.
|
|
||||||
|
|
||||||
Unless you are building a toolchain for sh3/4, you should leave that empty.
|
|
||||||
|
|
||||||
Note: If you need to pass more than one value, separate them with
|
|
||||||
'\n'. Eg.: var1=val1\nvar2=val2
|
|
||||||
|
|
||||||
config GLIBC_EXTRA_CFLAGS
|
|
||||||
string
|
|
||||||
prompt "extra target CFLAGS"
|
|
||||||
default ""
|
|
||||||
help
|
|
||||||
Extra target CFLAGS to use when building.
|
|
||||||
|
|
||||||
config GLIBC_ENABLE_FORTIFIED_BUILD
|
|
||||||
bool
|
|
||||||
prompt "Enable fortified build (EXPERIMENTAL)"
|
|
||||||
depends on EXPERIMENTAL
|
|
||||||
help
|
|
||||||
If you say 'y' here, then glibc will be using fortified versions
|
|
||||||
of functions with format arguments (eg. vsyslog, printf...), and
|
|
||||||
do a sanity check on the format at runtime, to avoid some of the
|
|
||||||
common format string attacks.
|
|
||||||
|
|
||||||
This is currently not supported, and will most probably result in
|
|
||||||
a broken build, with an error message like:
|
|
||||||
../misc/syslog.c: In function '__vsyslog_chk':
|
|
||||||
../misc/syslog.c:123: sorry, unimplemented: inlining failed in
|
|
||||||
call to 'syslog': function body not available
|
|
||||||
|
|
||||||
If you are brave enough and want to debug the issue, then say 'y'
|
|
||||||
here. Otherwise, be still and say 'n' (the default). ;-)
|
|
||||||
|
|
||||||
|
|
||||||
config GLIBC_DISABLE_VERSIONING
|
|
||||||
bool
|
|
||||||
prompt "Disable symbols versioning"
|
|
||||||
help
|
|
||||||
Do not include versioning information in the library objects.
|
|
||||||
|
|
||||||
config GLIBC_OLDEST_ABI
|
|
||||||
string
|
|
||||||
prompt "Oldest supported ABI"
|
|
||||||
default ""
|
|
||||||
help
|
|
||||||
Set the oldest ABI supported by the C library.
|
|
||||||
|
|
||||||
Setting this option, for example, to 2.2 will provide ABI support
|
|
||||||
back to (e)glibc-2.2.
|
|
||||||
|
|
||||||
If this option is not set, (e)glibc will choose for you.
|
|
||||||
|
|
||||||
config GLIBC_FORCE_UNWIND
|
|
||||||
bool
|
|
||||||
prompt "Force unwind support (READ HELP!)"
|
|
||||||
default y
|
|
||||||
help
|
|
||||||
If your toolchain fails building while building the C library
|
|
||||||
start files, or the complete C library, with a message like:
|
|
||||||
configure: error: forced unwind support is required
|
|
||||||
|
|
||||||
then you may try changing this option. Otherwise, leave it to
|
|
||||||
the default 'y'.
|
|
||||||
|
|
||||||
The issue seems to be related to building NPTL on old versions
|
|
||||||
of glibc on some architectures
|
|
||||||
(seen on s390, s390x and x86_64).
|
|
||||||
|
|
||||||
config GLIBC_LOCALES
|
|
||||||
bool
|
|
||||||
prompt "Build and install locales"
|
|
||||||
help
|
|
||||||
Whether to build and install the libc locale files for the target,
|
|
||||||
which is required in order to support internationalization.
|
|
||||||
|
|
||||||
if LIBC_glibc && GLIBC_LOCALES
|
|
||||||
comment "WARNING! "
|
|
||||||
comment "| The built locales will be usable if and only if the build "
|
|
||||||
comment "| machine and the target: "
|
|
||||||
comment "| - have the same endianness, "
|
|
||||||
comment "| - and have the same alignment requirements for uint32_t. "
|
|
||||||
comment "| You will have to check by yourself (for now). "
|
|
||||||
comment "WARNING! "
|
|
||||||
comment "| Building GLIBC locales requires that GLIBC supports "
|
|
||||||
comment "| the build machine as the target. "
|
|
||||||
endif # LIBC_glibc && GLIBC_LOCALES
|
|
||||||
|
|
||||||
if KERNEL_linux
|
|
||||||
|
|
||||||
choice GLIBC_SUPPORTED_KERNEL
|
|
||||||
bool
|
|
||||||
prompt "Minimum supported kernel version"
|
|
||||||
default GLIBC_KERNEL_VERSION_AS_HEADERS
|
|
||||||
|
|
||||||
config GLIBC_KERNEL_VERSION_NONE
|
|
||||||
bool
|
|
||||||
prompt "Let ./configure decide"
|
|
||||||
help
|
|
||||||
Let ./configure decide what minimum kernel version glibc will be
|
|
||||||
able to run against.
|
|
||||||
|
|
||||||
This will include legacy compatibility code for older kernels in
|
|
||||||
the C library, thus ensuring that it will run on a large number
|
|
||||||
of old kernels.
|
|
||||||
|
|
||||||
The minimum kernel version supported will be dependent upon the
|
|
||||||
target you build for. For example:
|
|
||||||
alpha*-*-linux-gnu Requires Linux 2.6.9 for NPTL
|
|
||||||
sh[34]-*-linux-gnu Requires Linux 2.6.11
|
|
||||||
powerpc* Requires Linux 2.4.19
|
|
||||||
arm*-*-linux-*gnueabi Requires Linux 2.6.16
|
|
||||||
|
|
||||||
config GLIBC_KERNEL_VERSION_AS_HEADERS
|
|
||||||
bool
|
|
||||||
prompt "Same as kernel headers (default)"
|
|
||||||
help
|
|
||||||
Normally, you'll want glibc to run against the same kernel
|
|
||||||
version as the one used for the headers.
|
|
||||||
|
|
||||||
This is the default.
|
|
||||||
|
|
||||||
If enabled, crosstool-ng will use the chosen version of kernel
|
|
||||||
headers for the glibc minimum kernel version supported, which is
|
|
||||||
what gets passed to "--enable-kernel=" when configuring glibc.
|
|
||||||
|
|
||||||
Enabling this will ensure that no legacy compatibility code for
|
|
||||||
older kernels is built into your C libraries, but it will
|
|
||||||
be unable to run on kernel versions older than whichever kernel
|
|
||||||
headers version you've built the toolchain for.
|
|
||||||
|
|
||||||
If you know for sure that your toolchain will never need to build
|
|
||||||
applications that will run under a kernel version older than your
|
|
||||||
chosen kernel headers version (CT_KERNEL_VERSION), you can choose
|
|
||||||
"y" here.
|
|
||||||
|
|
||||||
config GLIBC_KERNEL_VERSION_CHOSEN
|
|
||||||
bool
|
|
||||||
prompt "Specific kernel version"
|
|
||||||
help
|
|
||||||
Specify the earliest Linux kernel version you want glibc to
|
|
||||||
include support for. This does not have to match the kernel
|
|
||||||
headers version used for your toolchain. This controls what is
|
|
||||||
passed to the "--enable-kernel=" option to the glibc configure
|
|
||||||
script.
|
|
||||||
|
|
||||||
If you want to be able to statically link programs with your
|
|
||||||
toolchain's C library, make sure this kernel version is lower than
|
|
||||||
all kernels you wish to support to avoid "FATAL: kernel too old"
|
|
||||||
errors. The higher the version you specify, the less legacy code
|
|
||||||
will be built into libc.
|
|
||||||
|
|
||||||
Most people can leave this at the default value of "2.6.9".
|
|
||||||
|
|
||||||
if GLIBC_KERNEL_VERSION_CHOSEN
|
|
||||||
|
|
||||||
config GLIBC_MIN_KERNEL_VERSION
|
|
||||||
string
|
|
||||||
prompt "Minimum kernel version to support"
|
|
||||||
default "2.6.9"
|
|
||||||
help
|
|
||||||
Enter here the lowest kernel version glibc will be able to run against.
|
|
||||||
|
|
||||||
The minimum kernel version supported will be dependent upon the
|
|
||||||
target you build for. For example:
|
|
||||||
alpha*-*-linux-gnu Requires Linux 2.6.9 for NPTL
|
|
||||||
sh[34]-*-linux-gnu Requires Linux 2.6.11
|
|
||||||
powerpc* Requires Linux 2.4.19
|
|
||||||
arm*-*-linux-*gnueabi Requires Linux 2.6.16
|
|
||||||
|
|
||||||
Note that no sanity check is performed by crosstool-NG to ensure
|
|
||||||
that the value you enter here is appropriate for your target.
|
|
||||||
|
|
||||||
endif # GLIBC_KERNEL_VERSION_CHOSEN
|
|
||||||
|
|
||||||
endchoice
|
|
||||||
|
|
||||||
config GLIBC_MIN_KERNEL
|
|
||||||
string
|
|
||||||
default "" if GLIBC_KERNEL_VERSION_NONE
|
|
||||||
default LINUX_VERSION if GLIBC_KERNEL_VERSION_AS_HEADERS
|
|
||||||
default GLIBC_MIN_KERNEL_VERSION if GLIBC_KERNEL_VERSION_CHOSEN
|
|
||||||
|
|
||||||
endif # KERNEL_linux
|
|
@ -1,17 +1,66 @@
|
|||||||
# musl options
|
# musl second-part option
|
||||||
|
|
||||||
## depends on ! WINDOWS && ! BARE_METAL
|
## depends on ! WINDOWS && ! BARE_METAL
|
||||||
## depends on EXPERIMENTAL
|
## depends on EXPERIMENTAL
|
||||||
##
|
|
||||||
## select LIBC_SUPPORT_THREADS_NATIVE
|
## select LIBC_SUPPORT_THREADS_NATIVE
|
||||||
## select CC_CORE_PASSES_NEEDED
|
## select CC_CORE_PASSES_NEEDED
|
||||||
##
|
|
||||||
## help Musl is a new standard library to power a new generation of Linux-based
|
## help Musl is a new standard library to power a new generation of Linux-based
|
||||||
## help devices. musl is lightweight, fast, simple, free, and strives to be
|
## help devices. musl is lightweight, fast, simple, free, and strives to be
|
||||||
## help correct in the sense of standards-conformance and safety.
|
## help correct in the sense of standards-conformance and safety.
|
||||||
|
|
||||||
source "config/versions/musl.in"
|
source "config/versions/musl.in"
|
||||||
|
|
||||||
# FIXME why? it claims "native", why report "musl"?
|
# TBD why? it claims "native", why report "musl"?
|
||||||
config THREADS
|
config THREADS
|
||||||
default "musl"
|
default "musl"
|
||||||
|
|
||||||
|
config LIBC_MUSL_DEBUG
|
||||||
|
bool
|
||||||
|
prompt "Build with debugging information"
|
||||||
|
help
|
||||||
|
This option enables debugging information, this will increase the size of
|
||||||
|
the resulting library.
|
||||||
|
|
||||||
|
config LIBC_MUSL_WARNINGS
|
||||||
|
bool
|
||||||
|
prompt "Build with recommended warnings flags"
|
||||||
|
help
|
||||||
|
Build musl-libc with extra warnings, useful for musl-libc development.
|
||||||
|
|
||||||
|
choice
|
||||||
|
prompt "How to optimize musl-libc"
|
||||||
|
default LIBC_MUSL_OPTIMIZE_AUTO
|
||||||
|
|
||||||
|
config LIBC_MUSL_OPTIMIZE_NONE
|
||||||
|
bool
|
||||||
|
prompt "Do not optimize musl-libc"
|
||||||
|
help
|
||||||
|
This option sets `--enable-optimize=no' to disable optimization.
|
||||||
|
|
||||||
|
config LIBC_MUSL_OPTIMIZE_AUTO
|
||||||
|
bool
|
||||||
|
prompt "Use musl-libc's automatic optimization"
|
||||||
|
help
|
||||||
|
This option sets `--enable-optimize=auto' to automatically set optimization.
|
||||||
|
|
||||||
|
config LIBC_MUSL_OPTIMIZE_SPEED
|
||||||
|
bool
|
||||||
|
prompt "Optimize musl-libc for speed"
|
||||||
|
help
|
||||||
|
This option sets `--enable-optimize=yes' to set optimization to -O3 for speed.
|
||||||
|
|
||||||
|
config LIBC_MUSL_OPTIMIZE_SIZE
|
||||||
|
bool
|
||||||
|
prompt "Optimize musl-libc for size"
|
||||||
|
help
|
||||||
|
This option sets `--enable-optimize=size' to set optimization to -Os for size.
|
||||||
|
|
||||||
|
endchoice
|
||||||
|
|
||||||
|
config LIBC_MUSL_OPTIMIZE
|
||||||
|
string
|
||||||
|
default "no" if LIBC_MUSL_OPTIMIZE_NONE
|
||||||
|
default "auto" if LIBC_MUSL_OPTIMIZE_AUTO
|
||||||
|
default "yes" if LIBC_MUSL_OPTIMIZE_SPEED
|
||||||
|
default "size" if LIBC_MUSL_OPTIMIZE_SIZE
|
||||||
|
@ -1,51 +0,0 @@
|
|||||||
# musl second-part option
|
|
||||||
|
|
||||||
config LIBC_MUSL_DEBUG
|
|
||||||
bool
|
|
||||||
prompt "Build with debugging information"
|
|
||||||
help
|
|
||||||
This option enables debugging information, this will increase the size of
|
|
||||||
the resulting library.
|
|
||||||
|
|
||||||
config LIBC_MUSL_WARNINGS
|
|
||||||
bool
|
|
||||||
prompt "Build with recommended warnings flags"
|
|
||||||
help
|
|
||||||
Build musl-libc with extra warnings, useful for musl-libc development.
|
|
||||||
|
|
||||||
choice
|
|
||||||
prompt "How to optimize musl-libc"
|
|
||||||
default LIBC_MUSL_OPTIMIZE_AUTO
|
|
||||||
|
|
||||||
config LIBC_MUSL_OPTIMIZE_NONE
|
|
||||||
bool
|
|
||||||
prompt "Do not optimize musl-libc"
|
|
||||||
help
|
|
||||||
This option sets `--enable-optimize=no' to disable optimization.
|
|
||||||
|
|
||||||
config LIBC_MUSL_OPTIMIZE_AUTO
|
|
||||||
bool
|
|
||||||
prompt "Use musl-libc's automatic optimization"
|
|
||||||
help
|
|
||||||
This option sets `--enable-optimize=auto' to automatically set optimization.
|
|
||||||
|
|
||||||
config LIBC_MUSL_OPTIMIZE_SPEED
|
|
||||||
bool
|
|
||||||
prompt "Optimize musl-libc for speed"
|
|
||||||
help
|
|
||||||
This option sets `--enable-optimize=yes' to set optimization to -O3 for speed.
|
|
||||||
|
|
||||||
config LIBC_MUSL_OPTIMIZE_SIZE
|
|
||||||
bool
|
|
||||||
prompt "Optimize musl-libc for size"
|
|
||||||
help
|
|
||||||
This option sets `--enable-optimize=size' to set optimization to -Os for size.
|
|
||||||
|
|
||||||
endchoice
|
|
||||||
|
|
||||||
config LIBC_MUSL_OPTIMIZE
|
|
||||||
string
|
|
||||||
default "no" if LIBC_MUSL_OPTIMIZE_NONE
|
|
||||||
default "auto" if LIBC_MUSL_OPTIMIZE_AUTO
|
|
||||||
default "yes" if LIBC_MUSL_OPTIMIZE_SPEED
|
|
||||||
default "size" if LIBC_MUSL_OPTIMIZE_SIZE
|
|
@ -1,11 +1,10 @@
|
|||||||
# newlib options
|
# newlib options
|
||||||
|
|
||||||
## depends on BARE_METAL
|
## depends on BARE_METAL
|
||||||
##
|
|
||||||
## select LIBC_SUPPORT_THREADS_NONE
|
## select LIBC_SUPPORT_THREADS_NONE
|
||||||
## select CC_CORE_PASSES_NEEDED if CANADIAN
|
## select CC_CORE_PASSES_NEEDED if CANADIAN
|
||||||
## select CC_CORE_PASS_2_NEEDED if ! CANADIAN
|
## select CC_CORE_PASS_2_NEEDED if ! CANADIAN
|
||||||
##
|
|
||||||
## help Newlib is a C library intended for use on embedded systems. It is a
|
## help Newlib is a C library intended for use on embedded systems. It is a
|
||||||
## help conglomeration of several library parts, all under free software
|
## help conglomeration of several library parts, all under free software
|
||||||
## help licenses that make them easily usable on embedded products. Newlib
|
## help licenses that make them easily usable on embedded products. Newlib
|
||||||
@ -29,3 +28,192 @@ config NEWLIB_HAS_NANO_MALLOC
|
|||||||
config NEWLIB_HAS_NANO_FORMATTED_IO
|
config NEWLIB_HAS_NANO_FORMATTED_IO
|
||||||
def_bool y
|
def_bool y
|
||||||
depends on NEWLIB_2_2_or_later
|
depends on NEWLIB_2_2_or_later
|
||||||
|
|
||||||
|
config LIBC_NEWLIB_TARGET_CFLAGS
|
||||||
|
string
|
||||||
|
prompt "Target CFLAGS for newlib"
|
||||||
|
default ""
|
||||||
|
help
|
||||||
|
Used to add specific options when compiling the target libraries
|
||||||
|
(eg. -ffunction-sections -fdata-sections), which can't be defined
|
||||||
|
in global TARGET_CFLAGS, because they shall be not used for the
|
||||||
|
gcc target libraries.
|
||||||
|
Note: Both TARGET_CFLAGS and LIBC_NEWLIB_TARGET_CFLAGS are used
|
||||||
|
to compile the libraries.
|
||||||
|
|
||||||
|
Leave blank if you don't know better.
|
||||||
|
|
||||||
|
config LIBC_NEWLIB_IO_C99FMT
|
||||||
|
bool
|
||||||
|
prompt "Enable IOs on C99 formats"
|
||||||
|
help
|
||||||
|
Enable support for IOs on C99 formats.
|
||||||
|
|
||||||
|
config LIBC_NEWLIB_IO_LL
|
||||||
|
bool
|
||||||
|
prompt "Enable IOs on long long"
|
||||||
|
help
|
||||||
|
Enable support for IOs on long long integers.
|
||||||
|
|
||||||
|
config LIBC_NEWLIB_IO_FLOAT
|
||||||
|
bool
|
||||||
|
prompt "Enable IOs on floats and doubles"
|
||||||
|
help
|
||||||
|
Enable support for IOs on floating point
|
||||||
|
values (float and double).
|
||||||
|
|
||||||
|
config LIBC_NEWLIB_IO_LDBL
|
||||||
|
bool
|
||||||
|
prompt "Enable IOs on long doubles"
|
||||||
|
depends on LIBC_NEWLIB_IO_FLOAT
|
||||||
|
help
|
||||||
|
Enable support for IOs on long doubles.
|
||||||
|
|
||||||
|
config LIBC_NEWLIB_IO_POS_ARGS
|
||||||
|
bool
|
||||||
|
prompt "Enable printf-family positional arg support"
|
||||||
|
help
|
||||||
|
Enable printf-family positional arg support.
|
||||||
|
|
||||||
|
config LIBC_NEWLIB_FVWRITE_IN_STREAMIO
|
||||||
|
bool
|
||||||
|
prompt "Vector buffer mechanism to support stream IO buffering"
|
||||||
|
default y
|
||||||
|
help
|
||||||
|
NEWLIB implements the vector buffer mechanism to support stream IO
|
||||||
|
buffering required by C standard. This feature is possibly
|
||||||
|
unnecessary for embedded systems which won't change file buffering
|
||||||
|
with functions like `setbuf' or `setvbuf'. The buffering mechanism
|
||||||
|
still acts as default for STDIN/STDOUT/STDERR even if this option
|
||||||
|
is specified.
|
||||||
|
|
||||||
|
config LIBC_NEWLIB_UNBUF_STREAM_OPT
|
||||||
|
bool
|
||||||
|
prompt "Optimize fprintf to unbuffered unix file"
|
||||||
|
default y
|
||||||
|
help
|
||||||
|
NEWLIB does optimization when `fprintf to write only unbuffered unix
|
||||||
|
file'. It creates a temorary buffer to do the optimization that
|
||||||
|
increases stack consumption by about `BUFSIZ' bytes. Disabling this option
|
||||||
|
disables the optimization and saves size of text and stack.
|
||||||
|
|
||||||
|
config LIBC_NEWLIB_FSEEK_OPTIMIZATION
|
||||||
|
bool
|
||||||
|
prompt "Fseek optimisation"
|
||||||
|
default y
|
||||||
|
help
|
||||||
|
Disabling fseek optimisation can decrease code size.
|
||||||
|
|
||||||
|
config LIBC_NEWLIB_DISABLE_SUPPLIED_SYSCALLS
|
||||||
|
bool
|
||||||
|
prompt "Disable the syscalls supplied with newlib"
|
||||||
|
help
|
||||||
|
Disable the syscalls that come with newlib. You
|
||||||
|
will have to implement your own _sbrk, _read,
|
||||||
|
_write... If you plan to port newlib to a new
|
||||||
|
platform/board, say Yes.
|
||||||
|
|
||||||
|
config LIBC_NEWLIB_REGISTER_FINI
|
||||||
|
bool
|
||||||
|
prompt "Enable finalization function registration using atexit"
|
||||||
|
help
|
||||||
|
Enable finalization function registration using atexit.
|
||||||
|
|
||||||
|
config LIBC_NEWLIB_ATEXIT_DYNAMIC_ALLOC
|
||||||
|
bool
|
||||||
|
prompt "Enable dynamic allocation of atexit entries"
|
||||||
|
default y
|
||||||
|
help
|
||||||
|
Enable dynamic allocation of atexit entries.
|
||||||
|
|
||||||
|
config LIBC_NEWLIB_GLOBAL_ATEXIT
|
||||||
|
bool
|
||||||
|
prompt "Enable atexit data structure as global variable"
|
||||||
|
help
|
||||||
|
Enable atexit data structure as global variable. By doing so it is
|
||||||
|
move out of _reent structure, and can be garbage collected if atexit
|
||||||
|
is not referenced.
|
||||||
|
|
||||||
|
config LIBC_NEWLIB_LITE_EXIT
|
||||||
|
bool
|
||||||
|
prompt "Enable lite exit"
|
||||||
|
help
|
||||||
|
Enable lite exit, a size-reduced implementation of exit that doesn't
|
||||||
|
invoke clean-up functions such as _fini or global destructors.
|
||||||
|
|
||||||
|
config LIBC_NEWLIB_REENT_SMALL
|
||||||
|
bool
|
||||||
|
prompt "Enable small reentrant struct support"
|
||||||
|
help
|
||||||
|
Enable small reentrant struct support.
|
||||||
|
|
||||||
|
config LIBC_NEWLIB_MULTITHREAD
|
||||||
|
bool
|
||||||
|
prompt "Enable support for multiple threads"
|
||||||
|
default y
|
||||||
|
help
|
||||||
|
Enable support for multiple threads.
|
||||||
|
|
||||||
|
config LIBC_NEWLIB_EXTRA_SECTIONS
|
||||||
|
bool
|
||||||
|
prompt "Place each function & data element in their own section"
|
||||||
|
help
|
||||||
|
Place each function & data symbol in their own section. This allows
|
||||||
|
the linker to garbage collect unused symbols at link time.
|
||||||
|
|
||||||
|
config LIBC_NEWLIB_WIDE_ORIENT
|
||||||
|
bool
|
||||||
|
prompt "Allow wide C99 stream orientation"
|
||||||
|
default y
|
||||||
|
help
|
||||||
|
C99 states that each stream has an orientation, wide or byte. This
|
||||||
|
feature is possibly unnecessary for embedded systems which only do
|
||||||
|
byte input/output operations on stream. Disabling this feature can
|
||||||
|
decrease code size.
|
||||||
|
|
||||||
|
config LIBC_NEWLIB_ENABLE_TARGET_OPTSPACE
|
||||||
|
bool
|
||||||
|
prompt "Optimize newlib for size"
|
||||||
|
default y
|
||||||
|
help
|
||||||
|
Pass --enable-target-optspace to newlib configure.
|
||||||
|
|
||||||
|
This will compile newlib with -Os.
|
||||||
|
|
||||||
|
config LIBC_NEWLIB_LTO
|
||||||
|
bool
|
||||||
|
prompt "Enable Link Time Optimization"
|
||||||
|
depends on CC_GCC_USE_LTO
|
||||||
|
help
|
||||||
|
Builds the libraries with -flto to enable more aggressive link time
|
||||||
|
optimization. You will need to add -flto-partition=one to your
|
||||||
|
application's link line to keep the RETURN assembler macro together
|
||||||
|
with it's consumers.
|
||||||
|
|
||||||
|
config LIBC_NEWLIB_NANO_MALLOC
|
||||||
|
bool
|
||||||
|
prompt "Enable Nano Malloc"
|
||||||
|
depends on NEWLIB_HAS_NANO_MALLOC
|
||||||
|
help
|
||||||
|
NEWLIB has two implementations of malloc family's functions, one in
|
||||||
|
`mallocr.c' and the other one in `nano-mallocr.c'. This options
|
||||||
|
enables the nano-malloc implementation, which is for small systems
|
||||||
|
with very limited memory. Note that this implementation does not
|
||||||
|
support `--enable-malloc-debugging' any more.
|
||||||
|
|
||||||
|
config LIBC_NEWLIB_NANO_FORMATTED_IO
|
||||||
|
bool
|
||||||
|
prompt "Enable Nano Formatted I/O"
|
||||||
|
depends on NEWLIB_HAS_NANO_FORMATTED_IO
|
||||||
|
help
|
||||||
|
This builds NEWLIB with a special implementation of formatted I/O
|
||||||
|
functions, designed to lower the size of application on small systems
|
||||||
|
with size constraint issues. This option does not affect wide-char
|
||||||
|
formatted I/O functions.
|
||||||
|
|
||||||
|
config LIBC_NEWLIB_EXTRA_CONFIG_ARRAY
|
||||||
|
string
|
||||||
|
prompt "Extra config for newlib"
|
||||||
|
default ""
|
||||||
|
help
|
||||||
|
Extra flags to pass onto ./configure when configuring the newlib.
|
||||||
|
@ -1,190 +0,0 @@
|
|||||||
# newlib second-part options
|
|
||||||
|
|
||||||
config LIBC_NEWLIB_TARGET_CFLAGS
|
|
||||||
string
|
|
||||||
prompt "Target CFLAGS for newlib"
|
|
||||||
default ""
|
|
||||||
help
|
|
||||||
Used to add specific options when compiling the target libraries
|
|
||||||
(eg. -ffunction-sections -fdata-sections), which can't be defined
|
|
||||||
in global TARGET_CFLAGS, because they shall be not used for the
|
|
||||||
gcc target libraries.
|
|
||||||
Note: Both TARGET_CFLAGS and LIBC_NEWLIB_TARGET_CFLAGS are used
|
|
||||||
to compile the libraries.
|
|
||||||
|
|
||||||
Leave blank if you don't know better.
|
|
||||||
|
|
||||||
config LIBC_NEWLIB_IO_C99FMT
|
|
||||||
bool
|
|
||||||
prompt "Enable IOs on C99 formats"
|
|
||||||
help
|
|
||||||
Enable support for IOs on C99 formats.
|
|
||||||
|
|
||||||
config LIBC_NEWLIB_IO_LL
|
|
||||||
bool
|
|
||||||
prompt "Enable IOs on long long"
|
|
||||||
help
|
|
||||||
Enable support for IOs on long long integers.
|
|
||||||
|
|
||||||
config LIBC_NEWLIB_IO_FLOAT
|
|
||||||
bool
|
|
||||||
prompt "Enable IOs on floats and doubles"
|
|
||||||
help
|
|
||||||
Enable support for IOs on floating point
|
|
||||||
values (float and double).
|
|
||||||
|
|
||||||
config LIBC_NEWLIB_IO_LDBL
|
|
||||||
bool
|
|
||||||
prompt "Enable IOs on long doubles"
|
|
||||||
depends on LIBC_NEWLIB_IO_FLOAT
|
|
||||||
help
|
|
||||||
Enable support for IOs on long doubles.
|
|
||||||
|
|
||||||
config LIBC_NEWLIB_IO_POS_ARGS
|
|
||||||
bool
|
|
||||||
prompt "Enable printf-family positional arg support"
|
|
||||||
help
|
|
||||||
Enable printf-family positional arg support.
|
|
||||||
|
|
||||||
config LIBC_NEWLIB_FVWRITE_IN_STREAMIO
|
|
||||||
bool
|
|
||||||
prompt "Vector buffer mechanism to support stream IO buffering"
|
|
||||||
default y
|
|
||||||
help
|
|
||||||
NEWLIB implements the vector buffer mechanism to support stream IO
|
|
||||||
buffering required by C standard. This feature is possibly
|
|
||||||
unnecessary for embedded systems which won't change file buffering
|
|
||||||
with functions like `setbuf' or `setvbuf'. The buffering mechanism
|
|
||||||
still acts as default for STDIN/STDOUT/STDERR even if this option
|
|
||||||
is specified.
|
|
||||||
|
|
||||||
config LIBC_NEWLIB_UNBUF_STREAM_OPT
|
|
||||||
bool
|
|
||||||
prompt "Optimize fprintf to unbuffered unix file"
|
|
||||||
default y
|
|
||||||
help
|
|
||||||
NEWLIB does optimization when `fprintf to write only unbuffered unix
|
|
||||||
file'. It creates a temorary buffer to do the optimization that
|
|
||||||
increases stack consumption by about `BUFSIZ' bytes. Disabling this option
|
|
||||||
disables the optimization and saves size of text and stack.
|
|
||||||
|
|
||||||
config LIBC_NEWLIB_FSEEK_OPTIMIZATION
|
|
||||||
bool
|
|
||||||
prompt "Fseek optimisation"
|
|
||||||
default y
|
|
||||||
help
|
|
||||||
Disabling fseek optimisation can decrease code size.
|
|
||||||
|
|
||||||
config LIBC_NEWLIB_DISABLE_SUPPLIED_SYSCALLS
|
|
||||||
bool
|
|
||||||
prompt "Disable the syscalls supplied with newlib"
|
|
||||||
help
|
|
||||||
Disable the syscalls that come with newlib. You
|
|
||||||
will have to implement your own _sbrk, _read,
|
|
||||||
_write... If you plan to port newlib to a new
|
|
||||||
platform/board, say Yes.
|
|
||||||
|
|
||||||
config LIBC_NEWLIB_REGISTER_FINI
|
|
||||||
bool
|
|
||||||
prompt "Enable finalization function registration using atexit"
|
|
||||||
help
|
|
||||||
Enable finalization function registration using atexit.
|
|
||||||
|
|
||||||
config LIBC_NEWLIB_ATEXIT_DYNAMIC_ALLOC
|
|
||||||
bool
|
|
||||||
prompt "Enable dynamic allocation of atexit entries"
|
|
||||||
default y
|
|
||||||
help
|
|
||||||
Enable dynamic allocation of atexit entries.
|
|
||||||
|
|
||||||
config LIBC_NEWLIB_GLOBAL_ATEXIT
|
|
||||||
bool
|
|
||||||
prompt "Enable atexit data structure as global variable"
|
|
||||||
help
|
|
||||||
Enable atexit data structure as global variable. By doing so it is
|
|
||||||
move out of _reent structure, and can be garbage collected if atexit
|
|
||||||
is not referenced.
|
|
||||||
|
|
||||||
config LIBC_NEWLIB_LITE_EXIT
|
|
||||||
bool
|
|
||||||
prompt "Enable lite exit"
|
|
||||||
help
|
|
||||||
Enable lite exit, a size-reduced implementation of exit that doesn't
|
|
||||||
invoke clean-up functions such as _fini or global destructors.
|
|
||||||
|
|
||||||
config LIBC_NEWLIB_REENT_SMALL
|
|
||||||
bool
|
|
||||||
prompt "Enable small reentrant struct support"
|
|
||||||
help
|
|
||||||
Enable small reentrant struct support.
|
|
||||||
|
|
||||||
config LIBC_NEWLIB_MULTITHREAD
|
|
||||||
bool
|
|
||||||
prompt "Enable support for multiple threads"
|
|
||||||
default y
|
|
||||||
help
|
|
||||||
Enable support for multiple threads.
|
|
||||||
|
|
||||||
config LIBC_NEWLIB_EXTRA_SECTIONS
|
|
||||||
bool
|
|
||||||
prompt "Place each function & data element in their own section"
|
|
||||||
help
|
|
||||||
Place each function & data symbol in their own section. This allows
|
|
||||||
the linker to garbage collect unused symbols at link time.
|
|
||||||
|
|
||||||
config LIBC_NEWLIB_WIDE_ORIENT
|
|
||||||
bool
|
|
||||||
prompt "Allow wide C99 stream orientation"
|
|
||||||
default y
|
|
||||||
help
|
|
||||||
C99 states that each stream has an orientation, wide or byte. This
|
|
||||||
feature is possibly unnecessary for embedded systems which only do
|
|
||||||
byte input/output operations on stream. Disabling this feature can
|
|
||||||
decrease code size.
|
|
||||||
|
|
||||||
config LIBC_NEWLIB_ENABLE_TARGET_OPTSPACE
|
|
||||||
bool
|
|
||||||
prompt "Optimize newlib for size"
|
|
||||||
default y
|
|
||||||
help
|
|
||||||
Pass --enable-target-optspace to newlib configure.
|
|
||||||
|
|
||||||
This will compile newlib with -Os.
|
|
||||||
|
|
||||||
config LIBC_NEWLIB_LTO
|
|
||||||
bool
|
|
||||||
prompt "Enable Link Time Optimization"
|
|
||||||
depends on CC_GCC_USE_LTO
|
|
||||||
help
|
|
||||||
Builds the libraries with -flto to enable more aggressive link time
|
|
||||||
optimization. You will need to add -flto-partition=one to your
|
|
||||||
application's link line to keep the RETURN assembler macro together
|
|
||||||
with it's consumers.
|
|
||||||
|
|
||||||
config LIBC_NEWLIB_NANO_MALLOC
|
|
||||||
bool
|
|
||||||
prompt "Enable Nano Malloc"
|
|
||||||
depends on NEWLIB_HAS_NANO_MALLOC
|
|
||||||
help
|
|
||||||
NEWLIB has two implementations of malloc family's functions, one in
|
|
||||||
`mallocr.c' and the other one in `nano-mallocr.c'. This options
|
|
||||||
enables the nano-malloc implementation, which is for small systems
|
|
||||||
with very limited memory. Note that this implementation does not
|
|
||||||
support `--enable-malloc-debugging' any more.
|
|
||||||
|
|
||||||
config LIBC_NEWLIB_NANO_FORMATTED_IO
|
|
||||||
bool
|
|
||||||
prompt "Enable Nano Formatted I/O"
|
|
||||||
depends on NEWLIB_HAS_NANO_FORMATTED_IO
|
|
||||||
help
|
|
||||||
This builds NEWLIB with a special implementation of formatted I/O
|
|
||||||
functions, designed to lower the size of application on small systems
|
|
||||||
with size constraint issues. This option does not affect wide-char
|
|
||||||
formatted I/O functions.
|
|
||||||
|
|
||||||
config LIBC_NEWLIB_EXTRA_CONFIG_ARRAY
|
|
||||||
string
|
|
||||||
prompt "Extra config for newlib"
|
|
||||||
default ""
|
|
||||||
help
|
|
||||||
Extra flags to pass onto ./configure when configuring the newlib.
|
|
@ -110,3 +110,98 @@ config LIBC_UCLIBC_CONFIG_FILE
|
|||||||
Path to the configuration file.
|
Path to the configuration file.
|
||||||
|
|
||||||
If the file is not provided, we fall back to a default config file.
|
If the file is not provided, we fall back to a default config file.
|
||||||
|
|
||||||
|
if THREADS_LT && !UCLIBC_MERGED_LINUXTHREADS
|
||||||
|
|
||||||
|
choice
|
||||||
|
bool
|
||||||
|
prompt "Linuxthread implementation: "
|
||||||
|
default LIBC_UCLIBC_LNXTHRD_OLD
|
||||||
|
|
||||||
|
config LIBC_UCLIBC_LNXTHRD_OLD
|
||||||
|
bool
|
||||||
|
prompt "old/stable"
|
||||||
|
help
|
||||||
|
From the uClibc config option help:
|
||||||
|
There are two versions of linuxthreads. The older (stable) version
|
||||||
|
has been in uClibc for quite a long time but hasn't seen too many
|
||||||
|
updates other than bugfixes.
|
||||||
|
|
||||||
|
config LIBC_UCLIBC_LNXTHRD_NEW
|
||||||
|
bool
|
||||||
|
prompt "new"
|
||||||
|
help
|
||||||
|
From the uClibc config option help:
|
||||||
|
The new version has not been tested much, and lacks ports for arches
|
||||||
|
which glibc does not support (like frv, etc...), but is based on
|
||||||
|
the latest code from glibc, so it may be the only choice for the
|
||||||
|
newer ports (like alpha/amd64/64bit arches and hppa).
|
||||||
|
|
||||||
|
endchoice
|
||||||
|
|
||||||
|
endif # THREADS_LT
|
||||||
|
|
||||||
|
config LIBC_UCLIBC_LNXTHRD
|
||||||
|
string
|
||||||
|
default "" if THREADS_NONE
|
||||||
|
default "" if THREADS_NATIVE
|
||||||
|
default "" if UCLIBC_MERGED_LINUXTHREADS
|
||||||
|
default "old" if LIBC_UCLIBC_LNXTHRD_OLD
|
||||||
|
default "new" if LIBC_UCLIBC_LNXTHRD_NEW
|
||||||
|
|
||||||
|
config LIBC_UCLIBC_LOCALES
|
||||||
|
bool
|
||||||
|
select LIBC_UCLIBC_WCHAR
|
||||||
|
prompt "Add support for locales"
|
||||||
|
help
|
||||||
|
Say y if you want uClibc to support localisation.
|
||||||
|
|
||||||
|
Note that seems to be broken on recent uClibc releases.
|
||||||
|
|
||||||
|
config LIBC_UCLIBC_IPV6
|
||||||
|
bool
|
||||||
|
prompt "Add support for IPv6"
|
||||||
|
help
|
||||||
|
Say y if you want uClibc to support IPv6.
|
||||||
|
|
||||||
|
config LIBC_UCLIBC_WCHAR
|
||||||
|
bool
|
||||||
|
prompt "Add support for WCHAR"
|
||||||
|
help
|
||||||
|
Say y if you want uClibc to support WCHAR.
|
||||||
|
|
||||||
|
Maybe this is needed, if you're building a C++-Compiler
|
||||||
|
|
||||||
|
config LIBC_UCLIBC_FENV
|
||||||
|
bool
|
||||||
|
prompt "Add support for fenv.h"
|
||||||
|
default y if ARCH_x86
|
||||||
|
help
|
||||||
|
fenv.h provides functions to control the floating point environment,
|
||||||
|
such as rounding mode, exceptions...
|
||||||
|
|
||||||
|
For some architectures, fenv.h is incomplete, so is not installed
|
||||||
|
by default. x86 is known to have a rather complete fenv.h, so it is
|
||||||
|
installed by default only for x86.
|
||||||
|
|
||||||
|
If you need fenv.h on other architectures, say 'y' here, but you may
|
||||||
|
encounter some issues.
|
||||||
|
|
||||||
|
config LIBC_UCLIBC_RPC
|
||||||
|
bool
|
||||||
|
prompt "Add support for RPC"
|
||||||
|
help
|
||||||
|
Enable support for remote procedure calls (RPC) in uClibc.
|
||||||
|
|
||||||
|
if ARCH_arm
|
||||||
|
config LIBC_UCLIBC_USE_GNU_SUFFIX
|
||||||
|
bool
|
||||||
|
default y
|
||||||
|
prompt "Use -uclibcgnueabi suffix"
|
||||||
|
help
|
||||||
|
Depending on where the resulting toolchain will be used, you may need
|
||||||
|
to tweak the "system" part of the target tuple. Buildroot prefers
|
||||||
|
to have arm-*-linux-uclibcgnueabi; OpenEmbedded prefers
|
||||||
|
arm-*-linux-uclibceabi. Other tools seem to either accept both, or
|
||||||
|
don't care about the suffix.
|
||||||
|
endif
|
||||||
|
@ -1,96 +0,0 @@
|
|||||||
# uClibc second-part option
|
|
||||||
|
|
||||||
if THREADS_LT && !UCLIBC_MERGED_LINUXTHREADS
|
|
||||||
|
|
||||||
choice
|
|
||||||
bool
|
|
||||||
prompt "Linuxthread implementation: "
|
|
||||||
default LIBC_UCLIBC_LNXTHRD_OLD
|
|
||||||
|
|
||||||
config LIBC_UCLIBC_LNXTHRD_OLD
|
|
||||||
bool
|
|
||||||
prompt "old/stable"
|
|
||||||
help
|
|
||||||
From the uClibc config option help:
|
|
||||||
There are two versions of linuxthreads. The older (stable) version
|
|
||||||
has been in uClibc for quite a long time but hasn't seen too many
|
|
||||||
updates other than bugfixes.
|
|
||||||
|
|
||||||
config LIBC_UCLIBC_LNXTHRD_NEW
|
|
||||||
bool
|
|
||||||
prompt "new"
|
|
||||||
help
|
|
||||||
From the uClibc config option help:
|
|
||||||
The new version has not been tested much, and lacks ports for arches
|
|
||||||
which glibc does not support (like frv, etc...), but is based on
|
|
||||||
the latest code from glibc, so it may be the only choice for the
|
|
||||||
newer ports (like alpha/amd64/64bit arches and hppa).
|
|
||||||
|
|
||||||
endchoice
|
|
||||||
|
|
||||||
endif # THREADS_LT
|
|
||||||
|
|
||||||
config LIBC_UCLIBC_LNXTHRD
|
|
||||||
string
|
|
||||||
default "" if THREADS_NONE
|
|
||||||
default "" if THREADS_NATIVE
|
|
||||||
default "" if UCLIBC_MERGED_LINUXTHREADS
|
|
||||||
default "old" if LIBC_UCLIBC_LNXTHRD_OLD
|
|
||||||
default "new" if LIBC_UCLIBC_LNXTHRD_NEW
|
|
||||||
|
|
||||||
config LIBC_UCLIBC_LOCALES
|
|
||||||
bool
|
|
||||||
select LIBC_UCLIBC_WCHAR
|
|
||||||
prompt "Add support for locales"
|
|
||||||
help
|
|
||||||
Say y if you want uClibc to support localisation.
|
|
||||||
|
|
||||||
Note that seems to be broken on recent uClibc releases.
|
|
||||||
|
|
||||||
config LIBC_UCLIBC_IPV6
|
|
||||||
bool
|
|
||||||
prompt "Add support for IPv6"
|
|
||||||
help
|
|
||||||
Say y if you want uClibc to support IPv6.
|
|
||||||
|
|
||||||
config LIBC_UCLIBC_WCHAR
|
|
||||||
bool
|
|
||||||
prompt "Add support for WCHAR"
|
|
||||||
help
|
|
||||||
Say y if you want uClibc to support WCHAR.
|
|
||||||
|
|
||||||
Maybe this is needed, if you're building a C++-Compiler
|
|
||||||
|
|
||||||
config LIBC_UCLIBC_FENV
|
|
||||||
bool
|
|
||||||
prompt "Add support for fenv.h"
|
|
||||||
default y if ARCH_x86
|
|
||||||
help
|
|
||||||
fenv.h provides functions to control the floating point environment,
|
|
||||||
such as rounding mode, exceptions...
|
|
||||||
|
|
||||||
For some architectures, fenv.h is incomplete, so is not installed
|
|
||||||
by default. x86 is known to have a rather complete fenv.h, so it is
|
|
||||||
installed by default only for x86.
|
|
||||||
|
|
||||||
If you need fenv.h on other architectures, say 'y' here, but you may
|
|
||||||
encounter some issues.
|
|
||||||
|
|
||||||
config LIBC_UCLIBC_RPC
|
|
||||||
bool
|
|
||||||
prompt "Add support for RPC"
|
|
||||||
help
|
|
||||||
Enable support for remote procedure calls (RPC) in uClibc.
|
|
||||||
|
|
||||||
if ARCH_arm
|
|
||||||
config LIBC_UCLIBC_USE_GNU_SUFFIX
|
|
||||||
bool
|
|
||||||
default y
|
|
||||||
prompt "Use -uclibcgnueabi suffix"
|
|
||||||
help
|
|
||||||
Depending on where the resulting toolchain will be used, you may need
|
|
||||||
to tweak the "system" part of the target tuple. Buildroot prefers
|
|
||||||
to have arm-*-linux-uclibcgnueabi; OpenEmbedded prefers
|
|
||||||
arm-*-linux-uclibceabi. Other tools seem to either accept both, or
|
|
||||||
don't care about the suffix.
|
|
||||||
endif
|
|
@ -402,8 +402,6 @@ config ARCH_FLOAT
|
|||||||
default "soft" if ARCH_FLOAT_SW
|
default "soft" if ARCH_FLOAT_SW
|
||||||
default "softfp" if ARCH_FLOAT_SOFTFP
|
default "softfp" if ARCH_FLOAT_SOFTFP
|
||||||
|
|
||||||
source "config/gen/arch.in.2"
|
|
||||||
|
|
||||||
config TARGET_USE_OVERLAY
|
config TARGET_USE_OVERLAY
|
||||||
bool
|
bool
|
||||||
|
|
||||||
|
@ -1,238 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
set -e
|
|
||||||
|
|
||||||
# Adds a new version to one of the toolchain component
|
|
||||||
myname="$0"
|
|
||||||
|
|
||||||
# Parse the tools' paths configuration
|
|
||||||
# It is expected that this script is only to be run from the
|
|
||||||
# source directory of crosstool-NG, so it is trivial to find
|
|
||||||
# paths.sh (we can't use ". paths.sh", as POSIX states that
|
|
||||||
# $PATH should be searched for, and $PATH most probably doe
|
|
||||||
# not include "."), hence the "./".
|
|
||||||
. "./paths.sh"
|
|
||||||
|
|
||||||
doHelp() {
|
|
||||||
cat <<-EOF
|
|
||||||
Usage: ${myname} <--tool> <[options] version [...]> ...
|
|
||||||
'tool' in one of:
|
|
||||||
gcc, binutils, glibc, uClibc, uClibc-ng, newlib, linux, gdb,
|
|
||||||
duma, strace, ltrace, libelf, gmp, mpfr, isl, cloog, mpc,
|
|
||||||
mingw-w64, expat, ncurses, musl, gettext, zlib, libiconv
|
|
||||||
|
|
||||||
Valid options for all tools:
|
|
||||||
--stable, -s, +x (default)
|
|
||||||
mark the version as being stable (as opposed to experimental, below)
|
|
||||||
|
|
||||||
--experimental, -x, +s
|
|
||||||
mark the version as being experimental (as opposed to stable, above)
|
|
||||||
|
|
||||||
--current, -c, +o (default)
|
|
||||||
mark the version as being cuurent (as opposed to obsolete, below)
|
|
||||||
|
|
||||||
--obsolete, -o, +c
|
|
||||||
mark the version as being obsolete (as opposed to current, above)
|
|
||||||
|
|
||||||
Note: setting a new tool resets to the defaults: 'stable' and 'current'.
|
|
||||||
|
|
||||||
'version' is a valid version for the specified tool.
|
|
||||||
|
|
||||||
Examples:
|
|
||||||
add stable current version 2.6.19.2 to linux kernel:
|
|
||||||
${myname} --linux 2.6.19.2
|
|
||||||
|
|
||||||
add experimental obsolete version 2.3.5 and stable current versions 2.6.1
|
|
||||||
and 2.6.2 to glibc, add stable obsolete version 3.3.3 to gcc:
|
|
||||||
${myname} --glibc -x -o 2.3.5 -s -c 2.6.1 2.6.2 --gcc -o 3.3.3
|
|
||||||
EOF
|
|
||||||
}
|
|
||||||
|
|
||||||
# Extract field $3 from version $1 with separator $2
|
|
||||||
getVersionField() {
|
|
||||||
local version="$1"
|
|
||||||
local sep="$2"
|
|
||||||
local field="$3"
|
|
||||||
|
|
||||||
echo "${version}${sep}${sep}${sep}${sep}" |cut -d ${sep} -f ${field}
|
|
||||||
}
|
|
||||||
|
|
||||||
# Effectively add a version to the specified tool
|
|
||||||
# $cat : tool category
|
|
||||||
# $tool : tool name
|
|
||||||
# $tool_prefix : tool directory prefix
|
|
||||||
# $EXP : set to non empty if experimental, to empty otherwise
|
|
||||||
# OBS : set to non empty if obsolete, to empty otherwise
|
|
||||||
# $1 : version string to add
|
|
||||||
addToolVersion() {
|
|
||||||
local version="$1"
|
|
||||||
local file="$2"
|
|
||||||
local config_ver_option
|
|
||||||
local exp_obs_prompt
|
|
||||||
local deps v ver_M ver_m ver_p
|
|
||||||
local SedExpr1 SedExpr2
|
|
||||||
|
|
||||||
[ -f "${file}" ] || return 0
|
|
||||||
|
|
||||||
v=$(echo "${version}" |"${sed}" -r -e 's/-/_/g; s/\./_/g;')
|
|
||||||
|
|
||||||
config_ver_option="${cat}_V_${v}"
|
|
||||||
|
|
||||||
# Check for existing version: it can be legitimitate for an end-user
|
|
||||||
# to try adding a new version if the one he/she wants is not listed.
|
|
||||||
# But it can be the case where the version is hidden behind either one
|
|
||||||
# of EXPERIMENTAL or OBSOLETE, so warn if the version is already listed.
|
|
||||||
if ${grep} -E "^config ${config_ver_option}$" "${file}" >/dev/null 2>&1; then
|
|
||||||
echo "'${tool}': version '${version}' already present:"
|
|
||||||
${grep} -A1 -B0 -n \
|
|
||||||
-E "^(config ${config_ver_option}| {4}prompt \"${version}\")$" \
|
|
||||||
"${file}" /dev/null
|
|
||||||
return 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
SedExpr1="${SedExpr1}config ${config_ver_option}\n"
|
|
||||||
SedExpr1="${SedExpr1} bool\n"
|
|
||||||
SedExpr1="${SedExpr1} prompt \"${version}"
|
|
||||||
case "${EXP},${OBS}" in
|
|
||||||
,) ;;
|
|
||||||
,*) exp_obs_prompt=" (OBSOLETE)"
|
|
||||||
deps=" depends on OBSOLETE"
|
|
||||||
;;
|
|
||||||
*,) exp_obs_prompt=" (EXPERIMENTAL)"
|
|
||||||
deps=" depends on EXPERIMENTAL"
|
|
||||||
;;
|
|
||||||
*) exp_obs_prompt=" (EXPERIMENTAL, OBSOLETE)"
|
|
||||||
deps=" depends on EXPERIMENTAL \\&\\& OBSOLETE"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
[ -n "${exp_obs_prompt}" ] && SedExpr1="${SedExpr1}${exp_obs_prompt}"
|
|
||||||
SedExpr1="${SedExpr1}\""
|
|
||||||
[ -n "${deps}" ] && SedExpr1="${SedExpr1}\n${deps}"
|
|
||||||
case "${tool}" in
|
|
||||||
gcc)
|
|
||||||
# Extract 'M'ajor and 'm'inor from version string
|
|
||||||
ver_M=$(getVersionField "${version}" . 1)
|
|
||||||
ver_m=$(getVersionField "${version}" . 2)
|
|
||||||
if [ ${ver_M} -ge 4 ] && [ ${ver_m} -ge 2 ]; then
|
|
||||||
SedExpr1="${SedExpr1}\n select CC_GCC_${ver_M}_${ver_m}"
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
binutils)
|
|
||||||
# Extract 'M'ajor, 'm'inor, sometimes 'p'atch from version string
|
|
||||||
# TODO: Rework this
|
|
||||||
ver_M=$(getVersionField "${version}" . 1)
|
|
||||||
ver_m=$(getVersionField "${version}" . 2)
|
|
||||||
ver_p=$(getVersionField "${version}" . 3)
|
|
||||||
if [ ${ver_M} -eq 2 -a ${ver_m} -eq 27 ]; then
|
|
||||||
SedExpr1="${SedExpr1}\n select BINUTILS_2_27_or_later"
|
|
||||||
elif [ ${ver_M} -eq 2 -a ${ver_m} -eq 26 ]; then
|
|
||||||
SedExpr1="${SedExpr1}\n select BINUTILS_2_26_or_later"
|
|
||||||
elif [ ${ver_M} -eq 2 -a ${ver_m} -eq 25 -a ${ver_p} -eq 1 ]; then
|
|
||||||
SedExpr1="${SedExpr1}\n select BINUTILS_2_25_1_or_later"
|
|
||||||
elif [ ${ver_M} -eq 2 -a ${ver_m} -eq 25 -a -z ${ver_p} ]; then
|
|
||||||
SedExpr1="${SedExpr1}\n select BINUTILS_2_25_or_later"
|
|
||||||
elif [ ${ver_M} -eq 2 -a ${ver_m} -eq 24 ]; then
|
|
||||||
SedExpr1="${SedExpr1}\n select BINUTILS_2_24_or_later"
|
|
||||||
elif [ ${ver_M} -eq 2 -a ${ver_m} -eq 23 -a ${ver_p} -eq 2 ]; then
|
|
||||||
SedExpr1="${SedExpr1}\n select BINUTILS_2_23_2_or_later"
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
uClibc)
|
|
||||||
# uClibc-0.9.33.2 needs some love
|
|
||||||
ver_M=$(getVersionField "${version}" . 1)
|
|
||||||
ver_m=$(getVersionField "${version}" . 2)
|
|
||||||
ver_p=$(getVersionField "${version}" . 3)
|
|
||||||
if [ ${ver_M} -eq 0 -a ${ver_m} -eq 9 -a ${ver_p} -eq 33 ]; then
|
|
||||||
SedExpr1="${SedExpr1}\n select LIBC_UCLIBC_0_9_33_2_or_later"
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
uClibc-ng)
|
|
||||||
# uClibc-ng-1.0.15 changed threading configuration, no longer compatible
|
|
||||||
# with the rest of uClibc gang.
|
|
||||||
ver_M=$(getVersionField "${version}" . 1)
|
|
||||||
ver_m=$(getVersionField "${version}" . 2)
|
|
||||||
ver_p=$(getVersionField "${version}" . 3)
|
|
||||||
if [ ${ver_M} -eq 1 -a ${ver_m} -eq 0 -a ${ver_p} -eq 15 ]; then
|
|
||||||
SedExpr1="${SedExpr1}\n select LIBC_UCLIBC_NG_1_0_15_or_later"
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
gdb)
|
|
||||||
# gdb-7.0 and above have special handling
|
|
||||||
ver_M=$(getVersionField "${version}" . 1)
|
|
||||||
ver_m=$(getVersionField "${version}" . 2)
|
|
||||||
if [ ${ver_M} -ge 7 ]; then
|
|
||||||
if [ ${ver_m} -ge 2 ]; then
|
|
||||||
SedExpr1="${SedExpr1}\n select GDB_7_2_or_later"
|
|
||||||
else
|
|
||||||
SedExpr1="${SedExpr1}\n select GDB_7_0_or_later"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
SedExpr2=" default \"${version}\" if ${config_ver_option}"
|
|
||||||
"${sed}" -r -i -e 's/^(# CT_INSERT_VERSION_BELOW)$/\1\n\n'"${SedExpr1}"'/;' "${file}"
|
|
||||||
"${sed}" -r -i -e 's/^(# CT_INSERT_VERSION_STRING_BELOW)$/\1\n'"${SedExpr2}"'/;' "${file}"
|
|
||||||
}
|
|
||||||
|
|
||||||
cat=
|
|
||||||
tool=
|
|
||||||
tool_prefix=
|
|
||||||
VERSION=
|
|
||||||
EXP=
|
|
||||||
OBS=
|
|
||||||
|
|
||||||
if [ $# -eq 0 ]; then
|
|
||||||
doHelp
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
while [ $# -gt 0 ]; do
|
|
||||||
case "$1" in
|
|
||||||
# Tools:
|
|
||||||
--gcc) EXP=; OBS=; cat=CC_GCC; tool=gcc; tool_prefix=cc; dot2suffix=;;
|
|
||||||
--binutils) EXP=; OBS=; cat=BINUTILS; tool=binutils; tool_prefix=binutils; dot2suffix=;;
|
|
||||||
--glibc) EXP=; OBS=; cat=LIBC_GLIBC; tool=glibc; tool_prefix=libc; dot2suffix=;;
|
|
||||||
--uClibc) EXP=; OBS=; cat=LIBC_UCLIBC; tool=uClibc; tool_prefix=libc; dot2suffix=;;
|
|
||||||
--uClibc-ng)EXP=; OBS=; cat=LIBC_UCLIBC_NG; tool=uClibc; tool_prefix=libc; dot2suffix=;;
|
|
||||||
--newlib) EXP=; OBS=; cat=LIBC_NEWLIB; tool=newlib; tool_prefix=libc; dot2suffix=;;
|
|
||||||
--mingw-w64)EXP=; OBS=; cat=WINAPI; tool=mingw; tool_prefix=libc; dot2suffix=;;
|
|
||||||
--musl) EXP=; OBS=; cat=LIBC_MUSL; tool=musl; tool_prefix=libc; dot2suffix=;;
|
|
||||||
--linux) EXP=; OBS=; cat=KERNEL; tool=linux; tool_prefix=kernel; dot2suffix=;;
|
|
||||||
--gdb) EXP=; OBS=; cat=GDB; tool=gdb; tool_prefix=debug; dot2suffix=;;
|
|
||||||
--duma) EXP=; OBS=; cat=DUMA; tool=duma; tool_prefix=debug; dot2suffix=;;
|
|
||||||
--strace) EXP=; OBS=; cat=STRACE; tool=strace; tool_prefix=debug; dot2suffix=;;
|
|
||||||
--ltrace) EXP=; OBS=; cat=LTRACE; tool=ltrace; tool_prefix=debug; dot2suffix=;;
|
|
||||||
--gmp) EXP=; OBS=; cat=GMP; tool=gmp; tool_prefix=companion_libs; dot2suffix=;;
|
|
||||||
--mpfr) EXP=; OBS=; cat=MPFR; tool=mpfr; tool_prefix=companion_libs; dot2suffix=;;
|
|
||||||
--isl) EXP=; OBS=; cat=ISL; tool=isl; tool_prefix=companion_libs; dot2suffix=;;
|
|
||||||
--cloog) EXP=; OBS=; cat=CLOOG; tool=cloog; tool_prefix=companion_libs; dot2suffix=;;
|
|
||||||
--mpc) EXP=; OBS=; cat=MPC; tool=mpc; tool_prefix=companion_libs; dot2suffix=;;
|
|
||||||
--libelf) EXP=; OBS=; cat=LIBELF; tool=libelf; tool_prefix=companion_libs; dot2suffix=;;
|
|
||||||
--expat) EXP=; OBS=; cat=EXPAT; tool=expat; tool_prefix=companion_libs; dot2suffix=;;
|
|
||||||
--ncurses) EXP=; OBS=; cat=NCURSES; tool=ncurses; tool_prefix=companion_libs; dot2suffix=;;
|
|
||||||
--gettext) EXP=; OBS=; cat=GETTEXT; tool=gettext; tool_prefix=companion_libs; dot2suffix=;;
|
|
||||||
--libiconv) EXP=; OBS=; cat=LIBICONV; tool=libiconv; tool_prefix=companion_libs; dot2suffix=;;
|
|
||||||
--zlib) EXP=; OBS=; cat=ZLIB; tool=zlib; tool_prefix=companion_tools; dot2suffix=;;
|
|
||||||
--make) EXP=; OBS=; cat=MAKE; tool=make; tool_prefix=companion_tools; dot2suffix=;;
|
|
||||||
--m4) EXP=; OBS=; cat=M4; tool=m4; tool_prefix=companion_tools; dot2suffix=;;
|
|
||||||
--autoconf) EXP=; OBS=; cat=AUTOCONF; tool=autoconf; tool_prefix=companion_tools; dot2suffix=;;
|
|
||||||
--automake) EXP=; OBS=; cat=AUTOMAKE; tool=automake; tool_prefix=companion_tools; dot2suffix=;;
|
|
||||||
--libtool) EXP=; OBS=; cat=LIBTOOL; tool=libtool; tool_prefix=companion_tools; dot2suffix=;;
|
|
||||||
|
|
||||||
# Tools options:
|
|
||||||
-x|--experimental|+s) EXP=1;;
|
|
||||||
-s|--stable|+x) EXP=;;
|
|
||||||
-o|--obsolete|+c) OBS=1;;
|
|
||||||
-c|--current|+o) OBS=;;
|
|
||||||
|
|
||||||
# Misc:
|
|
||||||
-h|--help) doHelp; exit 0;;
|
|
||||||
-*) echo "Unknown option: '$1' (use -h/--help for help)."; exit 1;;
|
|
||||||
|
|
||||||
# Version string:
|
|
||||||
*) [ -n "${tool}" ] || { doHelp; exit 1; }
|
|
||||||
file_base="config/${tool_prefix}/${tool}.in"
|
|
||||||
addToolVersion "$1" "${file_base}${dot2suffix}"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
shift
|
|
||||||
done
|
|
@ -1,160 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
# Accept overrides from command line if needed
|
|
||||||
sed=${SED:-sed}
|
|
||||||
grep=${GREP:-grep}
|
|
||||||
|
|
||||||
# Generate either a choice or a menuconfig with the specified entries.
|
|
||||||
#
|
|
||||||
# Usage:
|
|
||||||
# generate a choice:
|
|
||||||
# gen_choice <out-file> <label> <config-prefix> <base-dir>
|
|
||||||
#
|
|
||||||
# generate a menuconfig:
|
|
||||||
# gen_menu <out-file> <label> <config-prefix> <base-dir>
|
|
||||||
#
|
|
||||||
# where:
|
|
||||||
# out-file
|
|
||||||
# put the generated choice/menuconfig into that file
|
|
||||||
# for choices, it acts as the base bname of the file, the secondary
|
|
||||||
# parts (the .in.2) are put in out-file.2
|
|
||||||
#
|
|
||||||
# label
|
|
||||||
# name for the entries family
|
|
||||||
# eg. Architecture, Kernel...
|
|
||||||
#
|
|
||||||
# config-prefix
|
|
||||||
# prefix for the choice entries
|
|
||||||
# eg. ARCH, KERNEL...
|
|
||||||
#
|
|
||||||
# base-dir
|
|
||||||
# base directory containing config files
|
|
||||||
# eg. config/arch, config/kernel...
|
|
||||||
#
|
|
||||||
|
|
||||||
# Helper: find the base names of all *.in files in a given directory
|
|
||||||
get_components() {
|
|
||||||
local dir="${1}"
|
|
||||||
local f b
|
|
||||||
|
|
||||||
for f in ${dir}/*.in; do
|
|
||||||
b=${f#${dir}/}
|
|
||||||
echo ${b%.in}
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
# Generate a choice
|
|
||||||
# See above for usage
|
|
||||||
gen_choice() {
|
|
||||||
local out_file="${1}"
|
|
||||||
local label="${2}"
|
|
||||||
local cfg_prefix="${3}"
|
|
||||||
local base_dir="${4}"
|
|
||||||
local file entry _entry
|
|
||||||
|
|
||||||
# Generate the part-1
|
|
||||||
exec >"${out_file}"
|
|
||||||
printf '# %s menu\n' "${label}"
|
|
||||||
printf '# Generated file, do not edit!!!\n'
|
|
||||||
printf '\n'
|
|
||||||
printf 'choice GEN_CHOICE_%s\n' "${cfg_prefix}"
|
|
||||||
printf ' bool\n'
|
|
||||||
printf ' prompt "%s"\n' "${label}"
|
|
||||||
printf '\n'
|
|
||||||
for entry in `get_components ${base_dir}`; do
|
|
||||||
file="${base_dir}/${entry}.in"
|
|
||||||
_entry=$(printf '%s\n' "${entry}" |"${sed}" -r -s -e 's/[-.+]/_/g;')
|
|
||||||
printf 'config %s_%s\n' "${cfg_prefix}" "${_entry}"
|
|
||||||
printf ' bool\n'
|
|
||||||
printf ' prompt "%s"\n' "${entry}"
|
|
||||||
"${sed}" -r -e '/^## depends on /!d; s/^## / /;' ${file} 2>/dev/null
|
|
||||||
"${sed}" -r -e '/^## select /!d; s/^## / /;' ${file} 2>/dev/null
|
|
||||||
if "${grep}" -E '^## help' ${file} >/dev/null 2>&1; then
|
|
||||||
printf ' help\n'
|
|
||||||
"${sed}" -r -e '/^## help ?/!d; s/^## help ?/ /;' ${file} 2>/dev/null
|
|
||||||
fi
|
|
||||||
printf '\n'
|
|
||||||
done
|
|
||||||
printf 'endchoice\n'
|
|
||||||
|
|
||||||
printf '\n'
|
|
||||||
printf 'config %s\n' "${cfg_prefix}"
|
|
||||||
printf ' string\n'
|
|
||||||
for entry in `get_components ${base_dir}`; do
|
|
||||||
file="${base_dir}/${entry}.in"
|
|
||||||
_entry=$(printf '%s\n' "${entry}" |"${sed}" -r -s -e 's/[-.+]/_/g;')
|
|
||||||
printf ' default "%s" if %s_%s\n' "${entry}" "${cfg_prefix}" "${_entry}"
|
|
||||||
done
|
|
||||||
|
|
||||||
printf '\n'
|
|
||||||
for entry in `get_components ${base_dir}`; do
|
|
||||||
file="${base_dir}/${entry}.in"
|
|
||||||
_entry=$(printf '%s\n' "${entry}" |"${sed}" -r -s -e 's/[-.+]/_/g;')
|
|
||||||
printf 'if %s_%s\n' "${cfg_prefix}" "${_entry}"
|
|
||||||
printf 'source "%s"\n' "${file}"
|
|
||||||
printf 'endif\n'
|
|
||||||
done
|
|
||||||
|
|
||||||
# Generate the part-2
|
|
||||||
exec >"${out_file}.2"
|
|
||||||
printf '# %s second part options\n' "${label}"
|
|
||||||
printf '# Generated file, do not edit!!!\n'
|
|
||||||
for entry in `get_components ${base_dir}`; do
|
|
||||||
file="${base_dir}/${entry}.in"
|
|
||||||
_entry=$(printf '%s\n' "${entry}" |"${sed}" -r -s -e 's/[-.+]/_/g;')
|
|
||||||
if [ -f "${file}.2" ]; then
|
|
||||||
printf '\n'
|
|
||||||
printf 'if %s_%s\n' "${cfg_prefix}" "${_entry}"
|
|
||||||
printf 'source "%s.2"\n' "${file}"
|
|
||||||
printf 'endif\n'
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
# Generate a menuconfig
|
|
||||||
# See above for usage
|
|
||||||
gen_menu() {
|
|
||||||
local out_file="${1}"
|
|
||||||
local label="${2}"
|
|
||||||
local cfg_prefix="${3}"
|
|
||||||
local base_dir="${4}"
|
|
||||||
local file entry _entry
|
|
||||||
|
|
||||||
# Generate the menuconfig
|
|
||||||
exec >"${out_file}"
|
|
||||||
printf '# %s menu\n' "${label}"
|
|
||||||
printf '# Generated file, do not edit!!!\n'
|
|
||||||
printf '\n'
|
|
||||||
for entry in `get_components ${base_dir}`; do
|
|
||||||
file="${base_dir}/${entry}.in"
|
|
||||||
_entry=$(printf '%s\n' "${entry}" |"${sed}" -r -s -e 's/[-.+]/_/g;')
|
|
||||||
printf 'menuconfig %s_%s\n' "${cfg_prefix}" "${_entry}"
|
|
||||||
printf ' bool\n'
|
|
||||||
if "${grep}" -E '^## default' ${file} >/dev/null 2>&1; then
|
|
||||||
"${sed}" -r -e '/^## default ?/!d; s/^## default ?/ default /;' ${file} 2>/dev/null
|
|
||||||
fi
|
|
||||||
printf ' prompt "%s"\n' "${entry}"
|
|
||||||
"${sed}" -r -e '/^## depends on /!d; s/^## / /;' ${file} 2>/dev/null
|
|
||||||
"${sed}" -r -e '/^## select /!d; s/^## / /;' ${file} 2>/dev/null
|
|
||||||
if "${grep}" -E '^## help' ${file} >/dev/null 2>&1; then
|
|
||||||
printf ' help\n'
|
|
||||||
"${sed}" -r -e '/^## help ?/!d; s/^## help ?/ /;' ${file} 2>/dev/null
|
|
||||||
fi
|
|
||||||
printf '\n'
|
|
||||||
printf 'if %s_%s\n' "${cfg_prefix}" "${_entry}"
|
|
||||||
printf 'source "%s"\n' "${file}"
|
|
||||||
printf 'endif\n'
|
|
||||||
printf '\n'
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
mkdir -p config/gen
|
|
||||||
gen_choice config/gen/arch.in "Target Architecture" "ARCH" "config/arch"
|
|
||||||
gen_choice config/gen/kernel.in "Target OS" "KERNEL" "config/kernel"
|
|
||||||
gen_choice config/gen/cc.in "Compiler" "CC" "config/cc"
|
|
||||||
gen_choice config/gen/binutils.in "Binutils" "BINUTILS" "config/binutils"
|
|
||||||
gen_choice config/gen/libc.in "C library" "LIBC" "config/libc"
|
|
||||||
gen_menu config/gen/debug.in "Debug facilities" "DEBUG" "config/debug"
|
|
||||||
gen_menu config/gen/companion_tools.in "Companion tools" "COMP_TOOLS" "config/companion_tools"
|
|
@ -1,560 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
########################################
|
|
||||||
# Common meta-language implementation. Syntax:
|
|
||||||
#
|
|
||||||
# The template file is processed line by line, with @@VAR@@ placeholders
|
|
||||||
# being replaced with a value of the VAR variable.
|
|
||||||
# Special lines start with '#!' and a keyword:
|
|
||||||
#
|
|
||||||
# #!//
|
|
||||||
# Comment, the rest of the line is ignored
|
|
||||||
# #!if COND
|
|
||||||
# Conditional: the lines until the matching #!end-if are processed
|
|
||||||
# only if the conditional COND evaluates to true.
|
|
||||||
# #!foreach NAME
|
|
||||||
# Iterate over NAME entities (the iterator must be set up first
|
|
||||||
# using the set_iter function), processing the lines until the matching
|
|
||||||
# #!end-foreach line.
|
|
||||||
|
|
||||||
declare -A info
|
|
||||||
|
|
||||||
debug()
|
|
||||||
{
|
|
||||||
if [ -n "${DEBUG}" ]; then
|
|
||||||
echo "DEBUG :: $@" >&2
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
msg()
|
|
||||||
{
|
|
||||||
if [ -z "${QUIET}" ]; then
|
|
||||||
echo "INFO :: $@" >&2
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
warn()
|
|
||||||
{
|
|
||||||
echo "WARN :: $@" >&2
|
|
||||||
}
|
|
||||||
|
|
||||||
error()
|
|
||||||
{
|
|
||||||
echo "ERROR :: $@" >&2
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
find_end()
|
|
||||||
{
|
|
||||||
local token="${1}"
|
|
||||||
local count=1
|
|
||||||
|
|
||||||
# Skip first line, we know it has the proper '#!' command on it
|
|
||||||
endline=$[l + 1]
|
|
||||||
while [ "${endline}" -le "${end}" ]; do
|
|
||||||
case "${tlines[${endline}]}" in
|
|
||||||
"#!${token} "*)
|
|
||||||
count=$[count + 1]
|
|
||||||
;;
|
|
||||||
"#!end-${token}")
|
|
||||||
count=$[count - 1]
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
if [ "${count}" = 0 ]; then
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
endline=$[endline + 1]
|
|
||||||
done
|
|
||||||
error "line ${l}: '${token}' token is unpaired"
|
|
||||||
}
|
|
||||||
|
|
||||||
set_iter()
|
|
||||||
{
|
|
||||||
local name="${1}"
|
|
||||||
|
|
||||||
if [ "${info[iter_${name}]+set}" = "set" ]; then
|
|
||||||
error "Iterator over '${name}' is already set up"
|
|
||||||
fi
|
|
||||||
shift
|
|
||||||
debug "Setting iterator over '${name}' to '$*'"
|
|
||||||
info[iter_${name}]="$*"
|
|
||||||
}
|
|
||||||
|
|
||||||
run_if()
|
|
||||||
{
|
|
||||||
local cond="${1}"
|
|
||||||
local endline
|
|
||||||
|
|
||||||
find_end "if"
|
|
||||||
if eval "${cond}"; then
|
|
||||||
debug "True conditional '${cond}' at lines ${l}..${endline}"
|
|
||||||
run_lines $[l + 1] $[endline - 1]
|
|
||||||
else
|
|
||||||
debug "False conditional '${cond}' at lines ${l}..${endline}"
|
|
||||||
fi
|
|
||||||
lnext=$[endline + 1]
|
|
||||||
debug "Continue at line ${lnext}"
|
|
||||||
}
|
|
||||||
|
|
||||||
do_foreach()
|
|
||||||
{
|
|
||||||
local var="${1}"
|
|
||||||
local v saveinfo
|
|
||||||
|
|
||||||
shift
|
|
||||||
if [ "`type -t enter_${var}`" != "function" ]; then
|
|
||||||
error "No parameter setup routine for iterator over '${var}'"
|
|
||||||
fi
|
|
||||||
for v in ${info[iter_${var}]}; do
|
|
||||||
saveinfo=`declare -p info`
|
|
||||||
eval "enter_${var} ${v}"
|
|
||||||
eval "$@"
|
|
||||||
eval "${saveinfo#declare -A }"
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
run_foreach()
|
|
||||||
{
|
|
||||||
local var="${1}"
|
|
||||||
local endline
|
|
||||||
|
|
||||||
if [ "${info[iter_${var}]+set}" != "set" ]; then
|
|
||||||
error "line ${l}: iterator over '${var}' is not defined"
|
|
||||||
fi
|
|
||||||
find_end "foreach"
|
|
||||||
debug "Loop over '${var}', lines ${l}..${endline}"
|
|
||||||
do_foreach ${var} run_lines $[l + 1] $[endline - 1]
|
|
||||||
lnext=$[endline + 1]
|
|
||||||
debug "Continue at line ${lnext}"
|
|
||||||
}
|
|
||||||
|
|
||||||
run_lines()
|
|
||||||
{
|
|
||||||
local start="${1}"
|
|
||||||
local end="${2}"
|
|
||||||
local l lnext s s1 v
|
|
||||||
|
|
||||||
debug "Running lines ${start}..${end}"
|
|
||||||
l=${start}
|
|
||||||
while [ "${l}" -le "${end}" ]; do
|
|
||||||
lnext=$[l+1]
|
|
||||||
s="${tlines[${l}]}"
|
|
||||||
# Expand @@foo@@ to ${info[foo]}. First escape variables/backslashes for evals below.
|
|
||||||
s="${s//\\/\\\\}"
|
|
||||||
s="${s//\$/\\\$}"
|
|
||||||
s1=
|
|
||||||
while [ -n "${s}" ]; do
|
|
||||||
case "${s}" in
|
|
||||||
*@@*@@*)
|
|
||||||
v="${s#*@@}"
|
|
||||||
v="${v%%@@*}"
|
|
||||||
if [ "${info[${v}]+set}" != "set" ]; then
|
|
||||||
error "line ${l}: reference to undefined variable '${v}'"
|
|
||||||
fi
|
|
||||||
s1="${s1}${s%%@@*}\${info[${v}]}"
|
|
||||||
s="${s#*@@*@@}"
|
|
||||||
;;
|
|
||||||
*@@*)
|
|
||||||
error "line ${l}: non-paired @@ markers"
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
s1="${s1}${s}"
|
|
||||||
break
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
s=${s1}
|
|
||||||
|
|
||||||
debug "Evaluate: ${s}"
|
|
||||||
case "${s}" in
|
|
||||||
"#!if "*)
|
|
||||||
run_if "${s#* }"
|
|
||||||
;;
|
|
||||||
"#!foreach "*)
|
|
||||||
run_foreach "${s#* }"
|
|
||||||
;;
|
|
||||||
"#!//"*)
|
|
||||||
# Comment, do nothing
|
|
||||||
;;
|
|
||||||
"#!"*)
|
|
||||||
error "line ${l}: unrecognized command"
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
# Not a special command
|
|
||||||
eval "echo \"${s//\"/\\\"}\""
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
l=${lnext}
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
run_template()
|
|
||||||
{
|
|
||||||
local -a tlines
|
|
||||||
local src="${1}"
|
|
||||||
|
|
||||||
debug "Running template ${src}"
|
|
||||||
mapfile -O 1 -t tlines < "${src}"
|
|
||||||
run_lines 1 ${#tlines[@]}
|
|
||||||
}
|
|
||||||
|
|
||||||
########################################
|
|
||||||
|
|
||||||
# Where the version configs are generated
|
|
||||||
config_dir=config/versions
|
|
||||||
template=maintainer/kconfig-versions.template
|
|
||||||
|
|
||||||
declare -A pkg_forks pkg_milestones pkg_nforks
|
|
||||||
declare -a pkg_masters pkg_all pkg_preferred
|
|
||||||
|
|
||||||
# Convert the argument to a Kconfig-style macro
|
|
||||||
kconfigize()
|
|
||||||
{
|
|
||||||
local v="${1}"
|
|
||||||
|
|
||||||
v=${v//[^0-9A-Za-z_]/_}
|
|
||||||
echo "${v^^}"
|
|
||||||
}
|
|
||||||
|
|
||||||
# Helper for cmp_versions: compare an upstream/debian portion of
|
|
||||||
# a version. Returns 0 if equal, otherwise echoes "-1" or "1" and
|
|
||||||
# returns 1.
|
|
||||||
equal_versions()
|
|
||||||
{
|
|
||||||
local v1="${1}"
|
|
||||||
local v2="${2}"
|
|
||||||
local p1 p2
|
|
||||||
|
|
||||||
# Compare alternating non-numerical/numerical portions, until
|
|
||||||
# non-equal portion is found or either string is exhausted.
|
|
||||||
while [ -n "${v1}" -a -n "${v2}" ]; do
|
|
||||||
# Find non-numerical portions and compare lexicographically
|
|
||||||
p1="${v1%%[0-9]*}"
|
|
||||||
p2="${v2%%[0-9]*}"
|
|
||||||
v1="${v1#${p1}}"
|
|
||||||
v2="${v2#${p2}}"
|
|
||||||
#debug "lex [${p1}] v [${p2}]"
|
|
||||||
if [ "${p1}" \< "${p2}" ]; then
|
|
||||||
echo "-1"
|
|
||||||
return 1
|
|
||||||
elif [ "${p1}" \> "${p2}" ]; then
|
|
||||||
echo "1"
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
#debug "rem [${v1}] v [${v2}]"
|
|
||||||
# Find numerical portions and compare numerically
|
|
||||||
p1="${v1%%[^0-9]*}"
|
|
||||||
p2="${v2%%[^0-9]*}"
|
|
||||||
v1="${v1#${p1}}"
|
|
||||||
v2="${v2#${p2}}"
|
|
||||||
#debug "num [${p1}] v [${p2}]"
|
|
||||||
if [ "${p1:-0}" -lt "${p2:-0}" ]; then
|
|
||||||
echo "-1"
|
|
||||||
return 1
|
|
||||||
elif [ "${p1:-0}" -gt "${p2:-0}" ]; then
|
|
||||||
echo "1"
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
#debug "rem [${v1}] v [${v2}]"
|
|
||||||
done
|
|
||||||
if [ -n "${v1}" ]; then
|
|
||||||
echo "1"
|
|
||||||
return 1
|
|
||||||
elif [ -n "${v2}" ]; then
|
|
||||||
echo "-1"
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
# Compare two version strings, similar to sort -V. But we don't
|
|
||||||
# want to depend on GNU sort availability on the host.
|
|
||||||
# See http://www.debian.org/doc/debian-policy/ch-controlfields.html
|
|
||||||
# for description of what the version is expected to be.
|
|
||||||
# Returns "-1", "0" or "1" if first version is earlier, same or
|
|
||||||
# later than the second.
|
|
||||||
cmp_versions()
|
|
||||||
{
|
|
||||||
local v1="${1}"
|
|
||||||
local v2="${2}"
|
|
||||||
local e1=0 e2=0 u1 u2 d1=0 d2=0
|
|
||||||
|
|
||||||
# Case-insensitive comparison
|
|
||||||
v1="${v1^^}"
|
|
||||||
v2="${v2^^}"
|
|
||||||
|
|
||||||
# Find if the versions contain epoch part
|
|
||||||
case "${v1}" in
|
|
||||||
*:*)
|
|
||||||
e1="${v1%%:*}"
|
|
||||||
v1="${v1#*:}"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
case "${v2}" in
|
|
||||||
*:*)
|
|
||||||
e2="${v2%%:*}"
|
|
||||||
v2="${v2#*:}"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# Compare epochs numerically
|
|
||||||
if [ "${e1}" -lt "${e2}" ]; then
|
|
||||||
echo "-1"
|
|
||||||
return
|
|
||||||
elif [ "${e1}" -gt "${e2}" ]; then
|
|
||||||
echo "1"
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Find if the version contains a "debian" part.
|
|
||||||
# v1/v2 will now contain "upstream" part.
|
|
||||||
case "${v1}" in
|
|
||||||
*-*)
|
|
||||||
d1=${v1##*-}
|
|
||||||
v1=${v1%-*}
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
case "${v2}" in
|
|
||||||
*-*)
|
|
||||||
d2=${v2##*-}
|
|
||||||
v2=${v2%-*}
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# Compare upstream
|
|
||||||
if equal_versions "${v1}" "${v2}" && equal_versions "${d1}" "${d2}"; then
|
|
||||||
echo "0"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# Sort versions, descending
|
|
||||||
sort_versions()
|
|
||||||
{
|
|
||||||
local sorted
|
|
||||||
local remains="$*"
|
|
||||||
local next_remains
|
|
||||||
local v vx found
|
|
||||||
|
|
||||||
while [ -n "${remains}" ]; do
|
|
||||||
#debug "Sorting [${remains}]"
|
|
||||||
for v in ${remains}; do
|
|
||||||
found=yes
|
|
||||||
next_remains=
|
|
||||||
#debug "Candidate ${v}"
|
|
||||||
for vx in ${remains}; do
|
|
||||||
#debug "${v} vs ${vx} :: `cmp_versions ${v} ${vx}`"
|
|
||||||
case `cmp_versions ${v} ${vx}` in
|
|
||||||
1)
|
|
||||||
next_remains+=" ${vx}"
|
|
||||||
;;
|
|
||||||
0)
|
|
||||||
;;
|
|
||||||
-1)
|
|
||||||
found=no
|
|
||||||
#debug "Bad: earlier than ${vx}"
|
|
||||||
break
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
if [ "${found}" = "yes" ]; then
|
|
||||||
# $v is less than all other members in next_remains
|
|
||||||
sorted+=" ${v}"
|
|
||||||
remains="${next_remains}"
|
|
||||||
#debug "Good candidate ${v} sorted [${sorted}] remains [${remains}]"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
done
|
|
||||||
echo "${sorted}"
|
|
||||||
}
|
|
||||||
|
|
||||||
read_file()
|
|
||||||
{
|
|
||||||
local l p
|
|
||||||
|
|
||||||
while read l; do
|
|
||||||
l="${p}${l}"
|
|
||||||
p=
|
|
||||||
case "${l}" in
|
|
||||||
"")
|
|
||||||
continue
|
|
||||||
;;
|
|
||||||
*\\)
|
|
||||||
p="${l%\\}"
|
|
||||||
continue
|
|
||||||
;;
|
|
||||||
"#"*)
|
|
||||||
continue
|
|
||||||
;;
|
|
||||||
*=*)
|
|
||||||
echo "info[${l%%=*}]=${l#*=}"
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
error "syntax error in '${1}': '${l}'"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
done < "${1}"
|
|
||||||
}
|
|
||||||
|
|
||||||
read_package_desc()
|
|
||||||
{
|
|
||||||
read_file "packages/${1}/package.desc"
|
|
||||||
}
|
|
||||||
|
|
||||||
read_version_desc()
|
|
||||||
{
|
|
||||||
read_file "packages/${1}/${2}/version.desc"
|
|
||||||
}
|
|
||||||
|
|
||||||
find_forks()
|
|
||||||
{
|
|
||||||
local -A info
|
|
||||||
|
|
||||||
info[preferred]=${1}
|
|
||||||
eval `read_package_desc ${1}`
|
|
||||||
|
|
||||||
if [ -n "${info[master]}" ]; then
|
|
||||||
pkg_nforks[${info[master]}]=$[pkg_nforks[${info[master]}]+1]
|
|
||||||
pkg_forks[${info[master]}]+=" ${1} "
|
|
||||||
else
|
|
||||||
pkg_preferred[${1}]=${info[preferred]}
|
|
||||||
pkg_nforks[${1}]=$[pkg_nforks[${1}]+1]
|
|
||||||
pkg_forks[${1}]+=" ${1} "
|
|
||||||
pkg_milestones[${1}]=`sort_versions ${info[milestones]}`
|
|
||||||
pkg_masters+=( "${1}" )
|
|
||||||
fi
|
|
||||||
# Keep sorting so that preferred fork is first
|
|
||||||
if [ -n "${pkg_preferred[${1}]}" ]; then
|
|
||||||
pkg_forks[${1}]="${pkg_preferred[${1}]} ${pkg_forks[${1}]##* ${pkg_preferred[${1}]} } ${pkg_forks[${1}]%% ${pkg_preferred[${1}]} *}"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
check_obsolete_experimental()
|
|
||||||
{
|
|
||||||
[ -z "${info[obsolete]}" ] && only_obsolete=
|
|
||||||
[ -z "${info[experimental]}" ] && only_experimental=
|
|
||||||
}
|
|
||||||
|
|
||||||
enter_fork()
|
|
||||||
{
|
|
||||||
local fork="${1}"
|
|
||||||
local versions
|
|
||||||
local only_obsolete only_experimental
|
|
||||||
|
|
||||||
# Set defaults
|
|
||||||
info[obsolete]=
|
|
||||||
info[experimental]=
|
|
||||||
info[repository]=
|
|
||||||
info[repository_branch]=
|
|
||||||
info[repository_cset]=
|
|
||||||
info[repository_subdir]=
|
|
||||||
info[bootstrap]=
|
|
||||||
info[fork]=${fork}
|
|
||||||
info[name]=${fork}
|
|
||||||
info[mirrors]=
|
|
||||||
info[archive_filename]='@{pkg_name}-@{version}'
|
|
||||||
info[archive_dirname]='@{pkg_name}-@{version}'
|
|
||||||
|
|
||||||
eval `read_package_desc ${fork}`
|
|
||||||
|
|
||||||
info[pfx]=`kconfigize ${fork}`
|
|
||||||
info[originpfx]=`kconfigize ${info[origin]}`
|
|
||||||
if [ -r "packages/${info[origin]}.help" ]; then
|
|
||||||
info[originhelp]=`sed 's/^/ /' "packages/${info[origin]}.help"`
|
|
||||||
else
|
|
||||||
info[originhelp]=" ${info[master]} from ${info[origin]}."
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -n "${info[repository]}" ]; then
|
|
||||||
info[vcs]=${info[repository]%% *}
|
|
||||||
info[repository_url]=${info[repository]#* }
|
|
||||||
fi
|
|
||||||
info[versionlocked]=`kconfigize "${info[versionlocked]}"`
|
|
||||||
|
|
||||||
versions=`cd packages/${fork} && \
|
|
||||||
for f in */version.desc; do [ -r "${f}" ] && echo "${f%/version.desc}"; done`
|
|
||||||
versions=`sort_versions ${versions}`
|
|
||||||
|
|
||||||
set_iter version ${versions}
|
|
||||||
info[all_versions]=${versions}
|
|
||||||
|
|
||||||
# If a fork does not define any versions at all ("rolling release"), do not
|
|
||||||
# consider it obsolete/experimental unless it is so marked in the fork's
|
|
||||||
# description.
|
|
||||||
if [ -n "${versions}" ]; then
|
|
||||||
only_obsolete=yes
|
|
||||||
only_experimental=yes
|
|
||||||
do_foreach version check_obsolete_experimental
|
|
||||||
info[only_obsolete]=${only_obsolete}
|
|
||||||
info[only_experimental]=${only_experimental}
|
|
||||||
else
|
|
||||||
info[only_obsolete]=${info[obsolete]}
|
|
||||||
info[only_experimental]=${info[experimental]}
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
enter_version()
|
|
||||||
{
|
|
||||||
local -A ver_postfix=( \
|
|
||||||
[,yes,,]=" (OBSOLETE)" \
|
|
||||||
[,,yes,]=" (EXPERIMENTAL)" \
|
|
||||||
[,yes,yes,]=" (OBSOLETE,EXPERIMENTAL)" )
|
|
||||||
local version="${1}"
|
|
||||||
|
|
||||||
eval `read_version_desc ${info[fork]} ${version}`
|
|
||||||
info[ver]=${version}
|
|
||||||
info[kcfg]=`kconfigize ${version}`
|
|
||||||
info[ver_postfix]=${ver_postfix[,${info[obsolete]},${info[experimental]},]}
|
|
||||||
}
|
|
||||||
|
|
||||||
enter_milestone()
|
|
||||||
{
|
|
||||||
local ms="${1}"
|
|
||||||
local cmp
|
|
||||||
|
|
||||||
info[ms]=${ms}
|
|
||||||
info[ms_kcfg]=`kconfigize ${ms}`
|
|
||||||
if [ -n "${info[ver]}" ]; then
|
|
||||||
info[version_cmp_milestone]=`cmp_versions ${info[ver]} ${info[ms]}`
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
rm -rf "${config_dir}"
|
|
||||||
mkdir -p "${config_dir}"
|
|
||||||
|
|
||||||
pkg_all=( `cd packages && \
|
|
||||||
ls */package.desc 2>/dev/null | \
|
|
||||||
while read f; do [ -r "${f}" ] && echo "${f%/package.desc}"; done | \
|
|
||||||
xargs echo` )
|
|
||||||
|
|
||||||
msg "Generating package version descriptions"
|
|
||||||
debug "Packages: ${pkg_all[@]}"
|
|
||||||
|
|
||||||
# We need to group forks of the same package into the same
|
|
||||||
# config file. Discover such relationships and only iterate
|
|
||||||
# over "master" packages at the top.
|
|
||||||
for p in "${pkg_all[@]}"; do
|
|
||||||
find_forks "${p}"
|
|
||||||
done
|
|
||||||
msg "Master packages: ${pkg_masters[@]}"
|
|
||||||
|
|
||||||
# Now for each master, create its kconfig file with version
|
|
||||||
# definitions.
|
|
||||||
for p in "${pkg_masters[@]}"; do
|
|
||||||
msg "Generating '${config_dir}/${p}.in'"
|
|
||||||
exec >"${config_dir}/${p}.in"
|
|
||||||
# Base definitions for the whole config file
|
|
||||||
info=( \
|
|
||||||
[master]=${p} \
|
|
||||||
[masterpfx]=`kconfigize ${p}` \
|
|
||||||
[nforks]=${pkg_nforks[${p}]} \
|
|
||||||
[all_milestones]=${pkg_milestones[${p}]} \
|
|
||||||
)
|
|
||||||
set_iter fork ${pkg_forks[${p}]}
|
|
||||||
set_iter milestone ${pkg_milestones[${p}]}
|
|
||||||
|
|
||||||
# TBD check that origins are set for all forks if there is more than one? or is it automatic because of a missing variable check?
|
|
||||||
# TBD get rid of the "origin" completely and use just the fork name?
|
|
||||||
run_template "${template}"
|
|
||||||
done
|
|
||||||
msg "Done!"
|
|
32
maintainer/kconfig-choice.template
Normal file
32
maintainer/kconfig-choice.template
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
#
|
||||||
|
# DO NOT EDIT! This file is automatically generated.
|
||||||
|
#
|
||||||
|
|
||||||
|
choice GEN_CHOICE_@@prefix@@
|
||||||
|
bool "@@label@@"
|
||||||
|
|
||||||
|
#!foreach choice
|
||||||
|
config @@prefix@@_@@choice@@
|
||||||
|
bool "@@choice@@"
|
||||||
|
#!foreach dependency
|
||||||
|
@@depline@@
|
||||||
|
#!end-foreach
|
||||||
|
help
|
||||||
|
#!foreach help
|
||||||
|
@@helpline@@
|
||||||
|
#!end-foreach
|
||||||
|
|
||||||
|
#!end-foreach
|
||||||
|
endchoice
|
||||||
|
|
||||||
|
config @@prefix@@
|
||||||
|
string
|
||||||
|
#!foreach choice
|
||||||
|
default "@@choice@@" if @@prefix@@_@@choice@@
|
||||||
|
#!end-foreach
|
||||||
|
|
||||||
|
#!foreach choice
|
||||||
|
if @@prefix@@_@@choice@@
|
||||||
|
source "config/@@dir@@/@@choice@@.in"
|
||||||
|
endif
|
||||||
|
#!end-foreach
|
20
maintainer/kconfig-menu.template
Normal file
20
maintainer/kconfig-menu.template
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
#
|
||||||
|
# DO NOT EDIT! This file is automatically generated.
|
||||||
|
#
|
||||||
|
|
||||||
|
#!foreach choice
|
||||||
|
menuconfig @@prefix@@_@@choice@@
|
||||||
|
bool "@@choice@@"
|
||||||
|
#!foreach dependency
|
||||||
|
@@depline@@
|
||||||
|
#!end-foreach
|
||||||
|
help
|
||||||
|
#!foreach help
|
||||||
|
@@helpline@@
|
||||||
|
#!end-foreach
|
||||||
|
|
||||||
|
if @@prefix@@_@@choice@@
|
||||||
|
source "config/@@dir@@/@@choice@@.in"
|
||||||
|
endif
|
||||||
|
|
||||||
|
#!end-foreach
|
Loading…
Reference in New Issue
Block a user