Hello
I am trying to manually crosscompile lirc for SH4 platform. I managed to do this with Audioniek buildsystem this way:
However I'd like to get this working with STM package devkit this way:Code:$ PATH=/home/pablocool/git/Audioniek/buildsystem/tufsbox/cross/bin:$PATH \ CC=sh4-linux-gcc CXX=sh4-linux-g++ \ LD=sh4-linux-ld NM=sh4-linux-nm AR=sh4-linux-ar \ AS=sh4-linux-as RANLIB=sh4-linux-ranlib STRIP=sh4-linux-strip \ OBJCOPY=sh4-linux-objcopy OBJDUMP=sh4-linux-objdump LN_S="ln -s" \ CFLAGS="-pipe -Os -ffunction-sections -fdata-sections -I/home/pablocool/git/Audioniek/buildsystem/tufsbox/cdkroot/usr/include -D__KERNEL_STRICT_NAMES" \ CPPFLAGS='-pipe -Os -ffunction-sections -fdata-sections -I/home/pablocool/git/Audioniek/buildsystem/tufsbox/cdkroot/usr/include' \ LDFLAGS='-Wl,-rpath -Wl,/usr/lib -Wl,-rpath-link -Wl,/home/pablocool/git/Audioniek/buildsystem/tufsbox/cdkroot/usr/lib -L/home/pablocool/git/Audioniek/buildsystem/tufsbox/cdkroot/usr/lib -L/home/pablocool/git/Audioniek/buildsystem/tufsbox/cdkroot/lib -Wl,--gc-sections' \ ./configure --build=x86_64-pc-linux-gnu --host=sh4-linux -q ac_cv_path_LIBUSB_CONFIG='' \ --build=x86_64-pc-linux-gnu --host=sh4-linux --prefix=/usr --sbindir=/usr/bin --mandir=/.remove \ --with-kerneldir=/home/pablocool/git/Audioniek/buildsystem/build_tmp/linux-sh4-2.6.32.71_stm24_0217 \ --without-x --with-devdir=/dev --with-moduledir=/lib/modules --with-major=61 --with-driver=userspace --enable-debug --with-syslog=LOG_DAEMON --enable-sandboxed $ PATH=/home/pablocool/git/Audioniek/buildsystem/tufsbox/cross/bin:$PATH \ make
But somehow generated Makefile differs this devkit way from Audioniek way. Difference is that HAVE_ALSA_SB_RC gets enabled and make command fails:Code:$ PATH=/opt/STM/STLinux-2.4/devkit/sh4/bin:$PATH \ CC=sh4-linux-gcc CXX=sh4-linux-g++ \ LD=sh4-linux-ld NM=sh4-linux-nm AR=sh4-linux-ar \ AS=sh4-linux-as RANLIB=sh4-linux-ranlib STRIP=sh4-linux-strip \ OBJCOPY=sh4-linux-objcopy OBJDUMP=sh4-linux-objdump LN_S="ln -s" \ CFLAGS="-pipe -Os -ffunction-sections -fdata-sections -I/opt/STM/STLinux-2.4/devkit/sh4/target/usr/include -D__KERNEL_STRICT_NAMES" \ CPPFLAGS='-pipe -Os -ffunction-sections -fdata-sections -I/opt/STM/STLinux-2.4/devkit/sh4/target/usr/include' \ LDFLAGS='-Wl,-rpath -Wl,/usr/lib -Wl,-rpath-link -Wl,/opt/STM/STLinux-2.4/devkit/sh4/target/usr/lib -L/opt/STM/STLinux-2.4/devkit/sh4/target/usr/lib -L/opt/STM/STLinux-2.4/devkit/sh4/target/lib -Wl,--gc-sections' \ ./configure --build=x86_64-pc-linux-gnu --host=sh4-linux -q ac_cv_path_LIBUSB_CONFIG='' \ --build=x86_64-pc-linux-gnu --host=sh4-linux --prefix=/usr --sbindir=/usr/bin --mandir=/.remove \ --with-kerneldir=/home/pablocool/git/Audioniek/buildsystem/build_tmp/linux-sh4-2.6.32.71_stm24_0217 \ --without-x --with-devdir=/dev --with-moduledir=/lib/modules --with-major=61 --with-driver=userspace --enable-debug --with-syslog=LOG_DAEMON --enable-sandboxed $ PATH=/opt/STM/STLinux-2.4/devkit/sh4/bin:$PATH \ make
I cannot figure out why libtool is looking for /usr/lib/libasound.so in host filesystem instead of /opt/STM/STLinux-2.4/devkit/sh4/target/usr/lib/libasound.soCode:/bin/sh ../libtool --tag=CC --mode=link sh4-linux-gcc -pipe -Os -ffunction-sections -fdata-sections -I/opt/STM/STLinux-2.4/devkit/sh4/target/usr/include -D__KERNEL_STRICT_NAMES -Wl,-rpath -Wl,/usr/lib -Wl,-rpath-link -Wl,/opt/STM/STLinux-2.4/devkit/sh4/target/usr/lib -L/opt/STM/STLinux-2.4/devkit/sh4/target/usr/lib -L/opt/STM/STLinux-2.4/devkit/sh4/target/lib -Wl,--gc-sections -o irrecord irrecord.o config_file.o dump_config.o input_map.o transmit.o libhw_module.a -lasound -lpthread libtool: link: sh4-linux-gcc -pipe -Os -ffunction-sections -fdata-sections -I/opt/STM/STLinux-2.4/devkit/sh4/target/usr/include -D__KERNEL_STRICT_NAMES -Wl,-rpath -Wl,/usr/lib -Wl,-rpath-link -Wl,/opt/STM/STLinux-2.4/devkit/sh4/target/usr/lib -Wl,--gc-sections -o irrecord irrecord.o config_file.o dump_config.o input_map.o transmit.o -L/opt/STM/STLinux-2.4/devkit/sh4/target/usr/lib -L/opt/STM/STLinux-2.4/devkit/sh4/target/lib libhw_module.a /usr/lib/libasound.so -lm -ldl -lrt -lpthread /usr/lib/libasound.so: file not recognized: File format not recognized collect2: error: ld returned 1 exit status make[3]: *** [Makefile:513: irrecord] Błąd 1 make[3]: Opuszczenie katalogu '/home/pablocool/Archive/lirc/lirc-0.9.0/daemons' make[2]: *** [Makefile:375: all] Błąd 2 make[2]: Opuszczenie katalogu '/home/pablocool/Archive/lirc/lirc-0.9.0/daemons' make[1]: *** [Makefile:333: all-recursive] Błąd 1 make[1]: Opuszczenie katalogu '/home/pablocool/Archive/lirc/lirc-0.9.0' make: *** [Makefile:262: all] Błąd 2
I hope someone could help