summaryrefslogtreecommitdiff
path: root/payloads/libpayload/bin/lpas
diff options
context:
space:
mode:
Diffstat (limited to 'payloads/libpayload/bin/lpas')
-rwxr-xr-xpayloads/libpayload/bin/lpas27
1 files changed, 24 insertions, 3 deletions
diff --git a/payloads/libpayload/bin/lpas b/payloads/libpayload/bin/lpas
index 37125b472d..a82570ceb0 100755
--- a/payloads/libpayload/bin/lpas
+++ b/payloads/libpayload/bin/lpas
@@ -27,17 +27,34 @@
## SUCH DAMAGE.
# AS wrapper for libpayload
+if [ -z "${V}" ] && [ "${V}" = 1 ]; then
+ DEBUGME=1
+else
+ DEBUGME=0
+fi
-DEFAULT_PREFIX=/opt
+if [ $DEBUGME -eq 1 ]; then
+ echo "AS = $AS"
+fi
+
+if [ -n "$AS" ]; then
+b=`basename "$AS"`
+if [ "$b" = "lpas" ]; then
+AS=""
+fi
+fi
+
+if [ "$AS" != "" ]; then
+DEFAULT_AS=$AS
+else
DEFAULT_AS=as
+fi
BASE=`dirname $0`
# This will set the _LIBDIR and _INCDIR variables used below
. $BASE/lp.functions
-DEBUGME=0
-
# This variable will contain the command line that the user wants to
# pass to gas
@@ -69,4 +86,8 @@ done
_ASFLAGS="--32 -I$_INCDIR"
+if [ $DEBUGME -eq 1 ]; then
+echo "$DEFAULT_AS $_ASFLAGS $CMDLINE"
+fi
+
$DEFAULT_AS $_ASFLAGS $CMDLINE