libbsd configure removes -D flags from CFLAGS of pkg-config

Sebastian Huber sebastian.huber at embedded-brains.de
Sat Sep 12 17:46:37 UTC 2020


Hello,

I can't build the libbsd for powerpc/beatnik:

---------------------------------------------
Compiler version (powerpc-rtems6-gcc)
10.2.1 20200904 (RTEMS 6, RSB 47f32b8b1a597b5ed3475722bdc155249ef51115, 
Newlib a0d7982)
Opening and load pkgconfig: 
/ramdisk/git-rtems-6/build/install/lib/pkgconfig/powerpc-rtems6-beatnik.pc
-----------------------------------------
CFLAGS ->
    -qrtems 
-B/ramdisk/git-rtems-6/build/install/powerpc-rtems6/beatnik/lib 
-D__ppc_generic -mcpu=7400
LDFLAGS ->
pkconfig warning: Label not found: LDFLAGS

LIB ->
pkconfig warning: Label not found: LIB

---------------------------------------------
Checking for a valid RTEMS BSP installation
==>
#include <rtems.h>
void Init(rtems_task_argument arg) { (void)arg; }
#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
#define CONFIGURE_MAXIMUM_TASKS 1
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#define CONFIGURE_INIT
#include <rtems/confdefs.h>
<==
[1/2] Compiling build/.conf_check_261484d99ea5da27480d47dee9a30c04/test.c

['/build/rtems/6/bin/powerpc-rtems6-gcc', '-qrtems', 
'-B/ramdisk/git-rtems-6/build/install/powerpc-rtems6/beatnik/lib', 
'-mcpu=7400', '-MMD', '../test.c', '-c', 
'-o/ramdisk/git-rtems-libbsd/build/.conf_check_261484d99ea5da27480d47dee9a30c04/testbuild/test.c.1.o']
err: In file included from 
/ramdisk/git-rtems-6/build/install/powerpc-rtems6/beatnik/lib/include/libcpu/powerpc-utility.h:46,
                  from 
/ramdisk/git-rtems-6/build/install/powerpc-rtems6/beatnik/lib/include/bsp/vectors.h:40,
                  from 
/ramdisk/git-rtems-6/build/install/powerpc-rtems6/beatnik/lib/include/bsp.h:45,
                  from 
/ramdisk/git-rtems-6/build/install/powerpc-rtems6/beatnik/lib/include/rtems/confdefs/bsp.h:53,
                  from 
/ramdisk/git-rtems-6/build/install/powerpc-rtems6/beatnik/lib/include/rtems/confdefs/extensions.h:45,
                  from 
/ramdisk/git-rtems-6/build/install/powerpc-rtems6/beatnik/lib/include/rtems/confdefs.h:67,
                  from ../test.c:7:
/ramdisk/git-rtems-6/build/install/powerpc-rtems6/beatnik/lib/include/rtems/powerpc/powerpc.h:289:2: 
error: #error "Unsupported CPU Model"
   289 | #error "Unsupported CPU Model"
       |  ^~~~~

I haven't figured out why the "-D__ppc_generic" is removed from the CFLAGS.



More information about the devel mailing list