* GCC patch Reuse-fdebug-prefix-map-to-replace-ffile-prefix-map.patch
@ 2016-09-21 12:20 Tomasz Meresinski
2016-09-21 13:27 ` Richard Purdie
0 siblings, 1 reply; 2+ messages in thread
From: Tomasz Meresinski @ 2016-09-21 12:20 UTC (permalink / raw)
To: poky
[-- Attachment #1: Type: text/plain, Size: 627 bytes --]
Hi
I found some difficulties when compiling some of our internal
applications because of gcc patch called
"Reuse-fdebug-prefix-map-to-replace-ffile-prefix-map.patch"
As far as I can see it makes __FILE__ macro to point to Yocto source
file location not build system's.
Now let me describe that problem:
1) CMake script gets source directory (so it's build system path)
2) CMake calculates its length and adds it as a define to application
(call it LEN)
3) A simple way to get a filename from __FILE__ macro is to compute
__FILE__ + LEN
4) Crash
Is this patch really a big deal?
Tomasz Meresiński
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4957 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: GCC patch Reuse-fdebug-prefix-map-to-replace-ffile-prefix-map.patch
2016-09-21 12:20 GCC patch Reuse-fdebug-prefix-map-to-replace-ffile-prefix-map.patch Tomasz Meresinski
@ 2016-09-21 13:27 ` Richard Purdie
0 siblings, 0 replies; 2+ messages in thread
From: Richard Purdie @ 2016-09-21 13:27 UTC (permalink / raw)
To: Tomasz Meresinski, poky
On Wed, 2016-09-21 at 14:20 +0200, Tomasz Meresinski wrote:
> Hi
> I found some difficulties when compiling some of our internal
> applications because of gcc patch called
> "Reuse-fdebug-prefix-map-to-replace-ffile-prefix-map.patch"
> As far as I can see it makes __FILE__ macro to point to Yocto source
> file location not build system's.
>
> Now let me describe that problem:
> 1) CMake script gets source directory (so it's build system path)
> 2) CMake calculates its length and adds it as a define to
> application
> (call it LEN)
> 3) A simple way to get a filename from __FILE__ macro is to compute
> __FILE__ + LEN
> 4) Crash
>
> Is this patch really a big deal?
Without it, build paths get encoded into the binaries. This means the
binaries differ depending on where they're built, it also means those
paths can be exposed to end users which can be confusing and doesn't
match the debug source locations used on target.
If you don't care about those things, its not a big deal. Personally, I
do believe that reproducible binaries are important though. I think
cmake is making some assumptions here it shouldn't.
Cheers,
Richard
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-09-21 13:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-21 12:20 GCC patch Reuse-fdebug-prefix-map-to-replace-ffile-prefix-map.patch Tomasz Meresinski
2016-09-21 13:27 ` Richard Purdie
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.