[solved] Defconfig ipq806x target optimization missing

Hello, target optimization seems to be missing after defconfig for the following:

CONFIG_TARGET_ipq806x=y
CONFIG_TARGET_ipq806x_DEVICE_netgear_r7800=y
CONFIG_TARGET_BOARD="ipq806x"

Used to show in menuconfig Advanced configuration options > Target Options as:
(-Os -pipe -mcpu=cortex-a15 -mfpu=neon-vfpv4) Target Optimizations

Now shows in menuconfig Advanced configuration options > Target Options as:
(-Os -pipe) Target Optimizations

I performed these steps:

  1. git pull
  2. ./scripts/feeds update -a && ./scripts/feeds install -a
  3. make clean with the following changes: Target System (Qualcomm Atheros IPQ806X) and Target Profile (Netgear Nighthawk X4S R7800)
  4. make defconfig
  5. make menuconfig

-mcpu and -mfpu are seemingly no longer defined for this target. Is this intended?

1 Like

I think the best answer to this question is: "They moved" (together with -mfloat=hard, which you never saw before, but it was necessary).

The idea is that cpu=cortex-a15 and fpu=neon-vfpv4 settings are now the built-in "defaults" as far as gcc for the IPQ806X is concerned. So they don't need to be specified specifically.

BIG EDIT: In case this gets overlooked from the commit: "Because this is a big change, the .config and toolchain need to be refreshed (as in removed and regenerated).". The existing toolchain needs to be refreshed!

To check this, run:

staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-7.4.0_musl_eabi/bin/arm-openwrt-linux-gcc --help=target -Q

and look for -mcpu=, -mfpu=, ...

On the "old/deprecated toolchains" this will look like:

./staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-7.4.0_musl_eabi/bin/arm-openwrt-linux-gcc -Q --help=target
arm-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined
The following options are target specific:
  -mabi=                                aapcs-linux
  -mabort-on-noreturn                   [disabled]
  -mandroid                             [disabled]
  -mapcs                                [disabled]
  -mapcs-frame                          [disabled]
  -mapcs-reentrant                      [disabled]
  -mapcs-stack-check                    [disabled]
  -march=                               armv2
  -marm                                 [enabled]
  -masm-syntax-unified                  [disabled]
  -mbig-endian                          [disabled]
  -mbionic                              [disabled]
  -mcallee-super-interworking           [disabled]
  -mcaller-super-interworking           [disabled]
  -mcmse                                [disabled]
  -mcpu=                                [default]
  -mfix-cortex-m3-ldrd                  [disabled]
  -mflip-thumb                          [disabled]
  -mfloat-abi=                          hard
  -mfp16-format=                        none
  -mfpu=                                vfp
  -mglibc                               [disabled]
  -mhard-float                
  -mlittle-endian                       [enabled]
  -mlong-calls                          [disabled]
  -mmusl                                [enabled]
  -mneon-for-64bits                     [disabled]
  -mpic-data-is-text-relative           [enabled]
  -mpic-register=             
  -mpoke-function-name                  [disabled]
  -mprint-tune-info                     [disabled]
  -mpure-code                           [disabled]
  -mrestrict-it                         [disabled]
  -msched-prolog                        [enabled]
  -msingle-pic-base                     [disabled]
  -mslow-flash-data                     [disabled]
  -msoft-float                
  -mstructure-size-boundary=            8
  -mthumb                               [disabled]
  -mthumb-interwork                     [disabled]
  -mtls-dialect=                        gnu
  -mtp=                                 soft
  -mtpcs-frame                          [disabled]
  -mtpcs-leaf-frame                     [disabled]
  -mtune=                               [default]
  -muclibc                              [disabled]
  -munaligned-access                    [disabled]
  -mvectorize-with-neon-double          [disabled]
  -mvectorize-with-neon-quad            [enabled]
  -mword-relocations                    [disabled]

on the newly generated one (this is from gcc 8.3, but it's close enough):

The following options are target specific:
  -mabi=                                aapcs-linux
  -mabort-on-noreturn                   [disabled]
  -mandroid                             [disabled]
  -mapcs                                [disabled]
  -mapcs-frame                          [disabled]
  -mapcs-reentrant                      [disabled]
  -mapcs-stack-check                    [disabled]
  -march=                               armv7ve+simd
  -marm                                 [enabled]
  -masm-syntax-unified                  [disabled]
  -mbe32                                [enabled]
  -mbe8                                 [disabled]
  -mbig-endian                          [disabled]
  -mbionic                              [disabled]
  -mbranch-cost=                        -1
  -mcallee-super-interworking           [disabled]
  -mcaller-super-interworking           [disabled]
  -mcmse                                [disabled]
  -mcpu=                                cortex-a15
  -mfix-cortex-m3-ldrd                  [disabled]
  -mflip-thumb                          [disabled]
  -mfloat-abi=                          hard
  -mfp16-format=                        none
  -mfpu=                                neon-vfpv4
  -mglibc                               [disabled]
  -mhard-float                
  -mlittle-endian                       [enabled]
  -mlong-calls                          [disabled]
  -mmusl                                [enabled]
  -mneon-for-64bits                     [disabled]
  -mpic-data-is-text-relative           [enabled]
  -mpic-register=             
  -mpoke-function-name                  [disabled]
  -mprint-tune-info                     [disabled]
  -mpure-code                           [disabled]
  -mrestrict-it                         [disabled]
  -msched-prolog                        [enabled]
  -msingle-pic-base                     [disabled]
  -mslow-flash-data                     [disabled]
  -msoft-float                
  -mstructure-size-boundary=            8
  -mthumb                               [disabled]
  -mthumb-interwork                     [disabled]
  -mtls-dialect=                        gnu
  -mtp=                                 cp15
  -mtpcs-frame                          [disabled]
  -mtpcs-leaf-frame                     [disabled]
  -mtune=                     
  -muclibc                              [disabled]
  -munaligned-access                    [enabled]
  -mvectorize-with-neon-double          [disabled]
  -mvectorize-with-neon-quad            [enabled]
  -mword-relocations                    [disabled]
2 Likes

Thank you chunkeey for the detailed explanation! I frequently review the project git in shortlog format for recent commits, but did not drill down into this particular one since I was (mistakenly) under the impression it was GCC 8-specific, while I use the default GCC 7 compiler.

I will do a fresh clone so next compile will have a correctly built toolchain.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.