I'm running into the following problem when doing a version bump to ppp-2.4.5.

The build happens as:

i486-openwrt-linux-gnu-gcc -Os -pipe -march=k6-2 -fno-align-functions 
-fno-align-loops -fno-align-jumps -fno-align-labels -fhonour-copts  
-I/home/philipp/openwrt/staging_dir/target-i386_eglibc-2.8/usr/include 
-I/home/philipp/openwrt/staging_dir/target-i386_eglibc-2.8/include 
-I/home/philipp/openwrt/staging_dir/toolchain-i386_gcc-4.4.4_eglibc-2.8/usr/include
 
-I/home/philipp/openwrt/staging_dir/toolchain-i386_gcc-4.4.4_eglibc-2.8/include 
 -O2 -g -I. -I../.. -I../../../include -fPIC -c -o pppol2tp.o pppol2tp.c

but this fails because I end up picking up the wrong version of 
linux/if_pppol2tp.h.

Reason is that the ppp-2.4.5 makefile specifies (as patched):

%.so: %.o
        $(CC) $(CFLAGS) $(CFLAGS_) -o $@ -shared $^ $(LDFLAGS) $(LDFLAGS_) 
$(LIBS) $(LIBS_)


so $(CFLAGS) is the TARGET_CFLAGS passed in for cross-compilation (including 
-I$(STAGING_DIR)/mumble), and $(CFLAGS_) is the flags that the PPP project 
requires, including -I../../../include ... so unfortunately the wrong order.

The makefile was done that way so that the project could override platform 
values (like -D and -U, -O, etc)... but unfortunately with -I flags they are 
handled in the order specified.

This problem has probably come up before.  Anyone have a clean fix?

Should the $(STAGING_DIR) directories be passed as -isystem instead of -I?

Thanks,

-Philip

_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to