[PATCH] buildsys: Preserve arguments passed on

Joseph Benden joe at benden.us
Thu Apr 4 16:41:52 UTC 2019


On 4/4/19 8:04 AM, Bernhard Reutner-Fischer wrote:
> On Fri, 22 Mar 2019 at 03:36, Joseph Benden <joe at benden.us> wrote:
>> This patch ensures all arguments are quoted, during command-line
>> construction.
>>
>> This fixes compilation where spaces occur within the arguments.
> Can you give me an example please?
> g++-uc -DFOO="BAR BAZ" -c ... ?
>
> TIA,
>
Hi,

Yes.

The problem was found in arguments sent from autotools. An example
compile would use the line below. The first problematic item is
-DPACKAGE_STRING in the line, along with the need for quotes to be
preserved in the line (else preprocessor fails):

/bin/bash ../../libtool  --tag=CC   --mode=compile powerpc-openwrt-linux-musl-gcc -DPACKAGE_NAME=\"aircrack-ng\" -DPACKAGE_TARNAME=\"aircrack-ng\" -DPACKAGE_VERSION=\"1.5.2\" -DPACKAGE_STRING=\"aircrack-ng\ 1.5.2\" -DPACKAGE_BUGREPORT=\"https://forum.aircrack-ng.org\" -DPACKAGE_URL=\"\" -DPACKAGE=\"aircrack-ng\" -DVERSION=\"1.5.2\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -D_REVISION=\"1.5.2\" -DHAVE_OPENSSL_CRYPTO_H=1 -DHAVE_OPENSSL_CMAC_H=1 -DHAVE_OPENSSL_CMAC_H=1 -DHAVE_PCAP_H=1 -DHAVE_PCAP=1 -DHAVE_PCRE=1 -DHAVE_ZLIB=1 -DHAVE_PTHREAD_PRIO_INHERIT=1 -D_REENTRANT=1 -DHAVE_POSIX_MEMALIGN=1 -DHAVE_SYS_AUXV_H=1 -DHAS_AUXV=1 -DCACHELINE_SIZE=64 -DHAVE_SYS_AUXV_H=1 -DHAS_AUXV=1 -DCACHELINE_SIZE=64 -I.  -I../.. -I../../src/include -I../../src   -I/data/bowl-builder/powerpc_8540/build/sdk/staging_dir/target-powerpc_8540_musl/usr/include -I/data/bowl-builder/powerpc_8540/build/sdk/staging_dir/target-powerpc_8540_musl/include -I/data/bowl-builder/powerpc_8540/build/sdk/staging_dir/toolchain-powerpc_8540_gcc-7.4.0_musl/usr/include -I/data/bowl-builder/powerpc_8540/build/sdk/staging_dir/toolchain-powerpc_8540_gcc-7.4.0_musl/include/fortify -I/data/bowl-builder/powerpc_8540/build/sdk/staging_dir/toolchain-powerpc_8540_gcc-7.4.0_musl/include  -I/data/bowl-builder/powerpc_8540/build/sdk/staging_dir/target-powerpc_8540_musl/usr/include -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -pthread   -Wall -std=gnu99 -fno-strict-aliasing -Wpointer-arith -Wstrict-overflow=2 -Wstrict-prototypes -fvisibility=hidden -Wno-unused-but-set-variable -Wno-array-bounds -Os -pipe -mcpu=8540 -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -msoft-float -iremap/data/bowl-builder/powerpc_8540/build/sdk/build_dir/target-powerpc_8540_musl/aircrack-ng-1.5.2:aircrack-ng-1.5.2 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -Wall -Wextra -ffunction-sections -fdata-sections  -MT libaircrack_crypto_la-memory.lo -MD -MP -MF .deps/libaircrack_crypto_la-memory.Tpo -c -o libaircrack_crypto_la-memory.lo `test -f 'memory.c' || echo './'`memory.c

Thanks,
-Joe



More information about the uClibc mailing list