Commit 0630b8ec by Thomas Preud'homme Committed by Thomas Preud'homme

fragments.texi (MULTILIB_REUSE): Mention that only options in MULTILIB_OPTIONS should be used.

2016-08-24  Thomas Preud'homme  <thomas.preudhomme@arm.com>

    * doc/fragments.texi (MULTILIB_REUSE): Mention that only options in
    MULTILIB_OPTIONS should be used.  Small wording fixes.
    * genmultilib: Memorize set of all option combinations in
    combination_space.  Detect if RHS of MULTILIB_REUSE uses an option not
    found in MULTILIB_OPTIONS by checking if option set is listed in
    combination_space.  Output new and existing error message to stderr.

From-SVN: r239734
parent 0ba81bbe
2016-08-24 Thomas Preud'homme <thomas.preudhomme@arm.com> 2016-08-24 Thomas Preud'homme <thomas.preudhomme@arm.com>
* doc/fragments.texi (MULTILIB_REUSE): Mention that only options in
MULTILIB_OPTIONS should be used. Small wording fixes.
* genmultilib: Memorize set of all option combinations in
combination_space. Detect if RHS of MULTILIB_REUSE uses an option not
found in MULTILIB_OPTIONS by checking if option set is listed in
combination_space. Output new and existing error message to stderr.
2016-08-24 Thomas Preud'homme <thomas.preudhomme@arm.com>
* config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping for * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping for
-mcpu=cortex-a7, -mfpu=neon-fp16, -mfpu=fpv5-d16 and -mfpu=fp-armv8. -mcpu=cortex-a7, -mfpu=neon-fp16, -mfpu=fpv5-d16 and -mfpu=fp-armv8.
Fix typo in -mfpu=vfpv3-d16-fp16 mapping. Fix typo in -mfpu=vfpv3-d16-fp16 mapping.
......
...@@ -156,15 +156,16 @@ variants. And for some targets it is better to reuse an existing multilib ...@@ -156,15 +156,16 @@ variants. And for some targets it is better to reuse an existing multilib
than to fall back to default multilib when there is no corresponding multilib. than to fall back to default multilib when there is no corresponding multilib.
This can be done by adding reuse rules to @code{MULTILIB_REUSE}. This can be done by adding reuse rules to @code{MULTILIB_REUSE}.
A reuse rule is comprised of two parts connected by equality sign. The left part A reuse rule is comprised of two parts connected by equality sign. The left
is option set used to build multilib and the right part is option set that will part is the option set used to build multilib and the right part is the option
reuse this multilib. The order of options in the left part matters and should be set that will reuse this multilib. Both parts should only use options
same with those specified in @code{MULTILIB_REQUIRED} or aligned with order in specified in @code{MULTILIB_OPTIONS} and the equality signs found in options
@code{MULTILIB_OPTIONS}. There is no such limitation for options in right part name should be replaced with periods. The order of options in the left part
as we don't build multilib from them. But the equality sign in both parts should matters and should be same with those specified in @code{MULTILIB_REQUIRED} or
be replaced with period. aligned with the order in @code{MULTILIB_OPTIONS}. There is no such limitation
for options in the right part as we don't build multilib from them.
The @code{MULTILIB_REUSE} is different from @code{MULTILIB_MATCHES} in that it
@code{MULTILIB_REUSE} is different from @code{MULTILIB_MATCHES} in that it
sets up relations between two option sets rather than two options. Here is an sets up relations between two option sets rather than two options. Here is an
example to demo how we reuse libraries built in Thumb mode for applications built example to demo how we reuse libraries built in Thumb mode for applications built
in ARM mode: in ARM mode:
......
...@@ -186,7 +186,8 @@ fi ...@@ -186,7 +186,8 @@ fi
EOF EOF
chmod +x tmpmultilib chmod +x tmpmultilib
combinations=`initial=/ ./tmpmultilib ${options}` combination_space=`initial=/ ./tmpmultilib ${options}`
combinations="$combination_space"
# If there exceptions, weed them out now # If there exceptions, weed them out now
if [ -n "${exceptions}" ]; then if [ -n "${exceptions}" ]; then
...@@ -472,14 +473,19 @@ for rrule in ${multilib_reuse}; do ...@@ -472,14 +473,19 @@ for rrule in ${multilib_reuse}; do
# in this variable, it means no multilib will be built for current reuse # in this variable, it means no multilib will be built for current reuse
# rule. Thus the reuse purpose specified by current rule is meaningless. # rule. Thus the reuse purpose specified by current rule is meaningless.
if expr "${combinations} " : ".*/${combo}/.*" > /dev/null; then if expr "${combinations} " : ".*/${combo}/.*" > /dev/null; then
combo="/${combo}/" if expr "${combination_space} " : ".*/${copts}/.*" > /dev/null; then
dirout=`./tmpmultilib3 "${combo}" "${todirnames}" "${toosdirnames}" "${enable_multilib}"` combo="/${combo}/"
copts="/${copts}/" dirout=`./tmpmultilib3 "${combo}" "${todirnames}" "${toosdirnames}" "${enable_multilib}"`
optout=`./tmpmultilib4 "${copts}" "${options}"` copts="/${copts}/"
# Output the line with all appropriate matches. optout=`./tmpmultilib4 "${copts}" "${options}"`
dirout="${dirout}" optout="${optout}" ./tmpmultilib2 # Output the line with all appropriate matches.
dirout="${dirout}" optout="${optout}" ./tmpmultilib2
else
echo "The rule ${rrule} contains an option absent from MULTILIB_OPTIONS." >&2
exit 1
fi
else else
echo "The rule ${rrule} is trying to reuse nonexistent multilib." echo "The rule ${rrule} is trying to reuse nonexistent multilib." >&2
exit 1 exit 1
fi fi
done done
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment