https://bugs.kde.org/show_bug.cgi?id=412344

            Bug ID: 412344
           Summary: Problem setting mips flags with specific paths
           Product: valgrind
           Version: 3.15 SVN
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: jsew...@acm.org
          Reporter: judge.pack...@gmail.com
  Target Milestone: ---

SUMMARY

Hi,

We have a bulid environment/CI system where we are cross-compiling valgrind for
various architectures. Due to the way the CI system creates it's working
directories such as ${os}-${arch} we end up with paths like
/workspace/linux-mips64/output which are included as part of the sysroot when
cross-compiling.

Our configure invocation ends up like this

CFLAGS='--sysroot=/workspace/linux-mips64/sysroot -g2 -gz  -mabi=64 -O0' \
    ./configure --target=mips64-unknown-linux-gnu \
                --host=mips64-unknown-linux-gnu \
                --build=x86_64-linux-gnu ...

This trips up the following grep in configure.ac

https://sourceware.org/git/?p=valgrind.git;a=blob;f=configure.ac;hb=HEAD#l1751

It matches the 'linux-mips64' and skips the code that sets FLAG_M32 and
FLAG_M64.

STEPS TO REPRODUCE
1. create sysroot in a path with 'linux-mips64' as a component
2. run 
  CFLAGS='--sysroot=/workspace/linux-mips64/sysroot -g2 -gz  -mabi=64 -O0' \
    ./configure --target=mips64-unknown-linux-gnu \
                --host=mips64-unknown-linux-gnu \
                --build=x86_64-linux-gnu
3. check values for FLAG_M32 and FLAG_M64 in config.log

OBSERVED RESULT

FLAG_M32 and FLAG_M64 are not set

EXPECTED RESULT

FLAG_M32='-mips32 -mabi=32' FLAG_M64='-march=mips64r2 -mabi=64'


SOFTWARE/OS VERSIONS
Linux: debian "buster"

ADDITIONAL INFORMATION

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to