Beginning with version 5.4 the environment-setup script contains a setting
for ARCH.  As we evaluate all variables simply to get TARGET_PREFIX this
overwrites ARCH from the calling shell.  Subsequently the ARCH logic
(needed for the transition phase where two ARCH settings were valid,
i.e. "ppc" and "powerpc") fails and does not output commands for
setting ARCH.

The proper fix is to only evaluate what we really need in the script.

Signed-off-by: Detlev Zundel <[email protected]>
---
 eldk-switch.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/eldk-switch.sh b/eldk-switch.sh
index 2ee3023..dcdc193 100755
--- a/eldk-switch.sh
+++ b/eldk-switch.sh
@@ -347,8 +347,8 @@ else
        pathcmd=$(cat ${config} | grep " PATH=")
        eval $pathcmd
        cmds=$(cat ${config} | grep -v " PATH=" | sed 's/$/ ; /g')
-       # We want to reference ${TARGET_PREFIX}, so evaluate the settings
-       eval $cmds
+       # We want to reference ${TARGET_PREFIX}, so evaluate it
+       eval $(cat ${config} | grep "TARGET_PREFIX=")
        # Built minimal set of variables, i.e. PATH, CROSS_COMPILE and ARCH
        min_cmds="export PATH=$PATH ; export CROSS_COMPILE=${TARGET_PREFIX}"
 #      cmds="$cmds ; export DEPMOD=${eldk_prefix}${rev}/usr/bin/depmod.pl"
-- 
1.8.3.1

_______________________________________________
eldk mailing list
[email protected]
http://lists.denx.de/mailman/listinfo/eldk

Reply via email to