frankkeyz / firmware-mod-kit

Automatically exported from code.google.com/p/firmware-mod-kit
0 stars 0 forks source link

Hardcoded parameters cause build to fail on ARM targets #95

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Build firmware-modkit on an ARM/ARMel target 
2. Build fails on squashfs build

fmk-087.

make -C ./bff/
make[1]: Entering directory `/media/files/src/firmware/firmware-mod-kit/src/bff'
gcc bff_huffman_decompress.c -o bff_huffman_decompress
make[1]: Leaving directory `/media/files/src/firmware/firmware-mod-kit/src/bff'
make -C ./uncramfs/
make[1]: Entering directory 
`/media/files/src/firmware/firmware-mod-kit/src/uncramfs'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory 
`/media/files/src/firmware/firmware-mod-kit/src/uncramfs'
make -C ./uncramfs-lzma/
make[1]: Entering directory 
`/media/files/src/firmware/firmware-mod-kit/src/uncramfs-lzma'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory 
`/media/files/src/firmware/firmware-mod-kit/src/uncramfs-lzma'
make -C ./cramfs-2.x/
make[1]: Entering directory 
`/media/files/src/firmware/firmware-mod-kit/src/cramfs-2.x'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory 
`/media/files/src/firmware/firmware-mod-kit/src/cramfs-2.x'
make -C ./cramfsswap/
make[1]: Entering directory 
`/media/files/src/firmware/firmware-mod-kit/src/cramfsswap'
strip cramfsswap
make[1]: Leaving directory 
`/media/files/src/firmware/firmware-mod-kit/src/cramfsswap'
make -C ./squashfs-2.1-r2/
make[1]: Entering directory 
`/media/files/src/firmware/firmware-mod-kit/src/squashfs-2.1-r2'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory 
`/media/files/src/firmware/firmware-mod-kit/src/squashfs-2.1-r2'
make -C ./squashfs-3.0/
make[1]: Entering directory 
`/media/files/src/firmware/firmware-mod-kit/src/squashfs-3.0'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory 
`/media/files/src/firmware/firmware-mod-kit/src/squashfs-3.0'
make -C ./squashfs-3.0-lzma-damn-small-variant/
make[1]: Entering directory 
`/media/files/src/firmware/firmware-mod-kit/src/squashfs-3.0-lzma-damn-small-var
iant'
cc -I. -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -funroll-loops -mtune=opteron 
-march=opteron -mfpmath=sse -m3dnow -msse2 -O3 -D_LZMA_PARAMS    -c -o 
mksquashfs.o mksquashfs.c
make[1]: Leaving directory 
`/media/files/src/firmware/firmware-mod-kit/src/squashfs-3.0-lzma-damn-small-var
iant'

cc1: error: bad value (opteron) for -mtune switch
cc1: error: bad value (opteron) for -march switch
cc1: error: unrecognized command line option ‘-mfpmath=sse’
cc1: error: unrecognized command line option ‘-m3dnow’
cc1: error: unrecognized command line option ‘-msse2’
make[1]: *** [mksquashfs.o] Error 1
make: *** [all] Error 2

Original issue reported on code.google.com by volta...@voltagex.org on 26 May 2013 at 9:48

GoogleCodeExporter commented 8 years ago
Also occurs in 
squashfs-3.0-lzma-damn-small-variant/lzma/C/7zip/Compress/LZMA_Lib/makefile

Original comment by volta...@voltagex.org on 26 May 2013 at 9:55

GoogleCodeExporter commented 8 years ago
It seems that someone decided to 'optimize' that old DD-WRT variant of squashfs 
so that it's compiled with the extended x86 instruction sets of SSE, SSE2, and 
3DNOW. I seriously doubt these instruction sets are even used, or advantageous 
if they are used. The sort of parallel operation on large data sets that would 
make these instruction sets useful just isn't done by squashfs. I have removed 
these switches and pushed the commits. If you see any other issues building to 
ARM, let me know.

Original comment by jeremy.collake@gmail.com on 26 May 2013 at 7:43