[DRE-maint] Bug#848660: ruby: might need to strip -fdebug-prefix-map

Chris Lamb lamby at debian.org
Tue Feb 12 09:31:22 GMT 2019


Hi Chris,

> > Strip it? As in, the output of CFLAGS ends up in the build...?
> 
> Indeed:
> 
> $ irb
> irb(main):001:0> RbConfig::CONFIG['CFLAGS']
> => "-g -O2 -fdebug-prefix-map=/build/ruby2.3-TqM27i/ruby2.3-2.3.3=. -
> fstack-protector-strong -Wformat -Werror=format-security -fPIC"
> 
> AFAIK the popular extension building mechanisms (mkmf et al) use this
> to discover the required build flags when compiling native extensions.

Getcha. They won't need that *particular* -fdebug-prefix-map value
though so you can probably strip it immediately prior to it
landing in the binary artifact(s) via:

   $ sed -e 's@ [^ ]*-f\(file\|debug\)-prefix-map=[^ ]*@@g'


Best wishes,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      lamby at debian.org 🍥 chris-lamb.co.uk
       `-



More information about the Pkg-ruby-extras-maintainers mailing list