gentoo and cflags

Discussion in 'General Discussion' started by schnabelvieh, Jan 28, 2015.

  1. schnabelvieh

    schnabelvieh New Member

    Joined:
    Jan 18, 2015
    Messages:
    6
    Likes Received:
    0
    Hi,

    i'm trying to set up a gentoo-distro on my udoo quad. After I build a lot of packages i've started to wonder about the cflags to use. Since gentoo compiles almost everything from scratch it might be interesting ;-)

    cat /proc/cpuinfo gave me:

    Features : swp half thumb fastmult vfp edsp neon vfpv3

    the stage3 tar ball was: stage3-armv7a_hardfp-20141023.tar.bz2

    and I didn't change the c-flags in /etc/portage/make.conf

    Thus my cflags are:

    CFLAGS="-O2 -pipe -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard"


    What do you think ? Do you think that those flags are reasonable ? I guess not, cause mfpu might be wrong, but which one to choose ? Neon, vfp or vfpv3 ?

    Would be happy to hear about your opinions ;-)

    Have fun,

    schnabelvieh
     
  2. vpeter

    vpeter Active Member

    Joined:
    Nov 29, 2014
    Messages:
    303
    Likes Received:
    62
    Openelec is using:
    Code:
      TARGET_CFLAGS="-march=armv7-a -mabi=aapcs-linux -Wno-psabi -Wa,-mno-warn-deprecated -mcpu=cortex-a9 -mfloat-abi=hard -mfpu=neon"
      TARGET_LDFLAGS="-march=armv7-a -mtune=cortex-a9"
      GCC_OPTS="--with-abi=aapcs-linux --with-arch=armv7-a --with-float=hard --with-fpu=neon"
     
  3. schnabelvieh

    schnabelvieh New Member

    Joined:
    Jan 18, 2015
    Messages:
    6
    Likes Received:
    0
    Hi vpeter,

    thanks so fare. I'm wondering about the "TARGET" part in the variables. Does it mean those variable come from a crossdev - helper which compiles stuff using the TARGET-FLAGS for the Udoo ?

    have fun,

    schnabelvieh
     
  4. vpeter

    vpeter Active Member

    Joined:
    Nov 29, 2014
    Messages:
    303
    Likes Received:
    62
    TARGET_CFLAGS in TARGET_LDFLAGS are CFLAGS in LDFLAGS with using armv7a-openelec-linux-gnueabi-gcc.
     

Share This Page