Menu

#101 Ltris cross compiling problem on aarch64-buildroot-linux-gnu-gcc

None
closed-fixed
nobody
None
5
2023-09-05
2023-08-02
No

Hello,
since this commit https://sourceforge.net/p/lgames/code/432/ I am unable to cross-compile Ltris in my Linux Buildroot environment. Indeed it generates CFLAGS variable with some "-I/usr/include/SDL" inside. That triggers arm64-linux-gcc errors:

aarch64-buildroot-linux-gnu-gcc: ERROR: unsafe header/library path used in cross-compilation: '-I/usr/include/SDL'

To fix this I have to patch your configure file like this:
~~~ ./configure file, line 9252
-CFLAGS="$CFLAGS $(sdl-config --cflags)"
-LIBS="$LIBS $(sdl-config --libs)"
+CFLAGS="$CFLAGS $($SDL_CONFIG --cflags)"
+LIBS="$LIBS $($SDL_CONFIG --libs)"
~~~

Afterward Ltris build successfully again.

Could you please check this on your side and apply my fix to your code if it's correct ? (I think you have to modify your configure.ac and regenerates your configure)

Thank you very much & best regards !
Julien

Discussion

  • Michael Speck

    Michael Speck - 2023-09-05
    • status: open --> closed-fixed
    • Group: -->
     
  • Michael Speck

    Michael Speck - 2023-09-05

    Thanks for pointing out, works for me. It seems the macro defines SDL_CONFIG with proper prefixes. I'm surprised that hardcoding the host system's sdl_config didn't break your cross compile tool chain before.

     

Log in to post a comment.