[BusyBox] shell compile cleanup

Bryan Rittmeyer bryan at ixiacom.com
Thu Nov 30 03:02:20 UTC 2000


Howdy,

I just got the latest CVS checkout of BusyBox and was unable to link in
sh.o:

sh.o: In function `globLastArgument':
sh.o(.text+0xc18): undefined reference to `process_escape_sequence'
collect2: ld returned 1 exit status
make: *** [busybox] Error 1

A little grepping around revealed this was a utility.c function which is
only defined if BB_ECHO or BB_TR are enabled. Since I'm not using either
of these, the function was never built, and the linker bombed. Here's
the fixup patch:


--- utility-virgin.c    Wed Nov 29 18:53:45 2000
+++ utility.c   Wed Nov 29 18:56:44 2000
@@ -1676,7 +1676,7 @@
 }
 #endif /* BB_CAT */
 
-#if defined BB_ECHO || defined BB_TR
+#if defined BB_ECHO || defined BB_TR || defined BB_SH
 char process_escape_sequence(char **ptr)
 {
        char c;


I'm assuming the SH dependency on this function is relatively recent and
wasn't caught because most people usually include echo (if not tr).

I love fixing bugs on this project. They're always minor. Or maybe
that's just because I'm too lazy, err, busy, to tackle the big ones? =)

Regards,

Bryan

-- 
Bryan Rittmeyer
mailto:bryan at ixiacom.com
Ixia Communications
26601 W. Agoura Rd.
Calabasas, CA 91302





More information about the busybox mailing list