Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] environment: set -ffile-prefix-map
@ 2022-10-23  0:50 sgn
  2022-11-09  1:09 ` [PR PATCH] [Updated] " sgn
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: sgn @ 2022-10-23  0:50 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1712 bytes --]

There is a new pull request by sgn against master on the void-packages repository

https://github.com/sgn/void-packages common-prefix-map
https://github.com/void-linux/void-packages/pull/40120

environment: set -ffile-prefix-map
We're setting -fdebug-prefix-map to strip directory prefixes from debug info, which will help ccache and reproducibility.

However, -fdebug-prefix-map doesn't help with those macros like __FILE__ and __BASE_FILE__, which needs another flags: -fmacro-prefix-map.

Replaces -fdebug-prefix-map with -ffile-prefix-map which is an alias for both `-fdebug-prefix-map` and `-fmacro-prefix-map`. (This flag is available since GCC 8 and Clang 10)

<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES**|**briefly**|**NO**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/40120.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-common-prefix-map-40120.patch --]
[-- Type: text/x-diff, Size: 2085 bytes --]

From 9d39007a490be1801fd448abaeebb04a1164fefe Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Sun, 23 Oct 2022 07:32:23 +0700
Subject: [PATCH] environment: set -ffile-prefix-map

We're setting -fdebug-prefix-map to strip directory prefixes from debug
info, which will help ccache and reproducibility.

However, -fdebug-prefix-map doesn't help with those macros like __FILE__
and __BASE_FILE__, which needs another flags: -fmacro-prefix-map.

Replaces -fdebug-prefix-map with -ffile-prefix-map which is an alias for
both `-fdebug-prefix-map` and `-fmacro-prefix-map`. (This flag is
available since GCC 8 and Clang 10)
---
 .../environment/configure/debug-debug-prefix-map.sh  | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/common/environment/configure/debug-debug-prefix-map.sh b/common/environment/configure/debug-debug-prefix-map.sh
index 40b3a7b46bcc..d7eb0402f18b 100644
--- a/common/environment/configure/debug-debug-prefix-map.sh
+++ b/common/environment/configure/debug-debug-prefix-map.sh
@@ -1,16 +1,16 @@
 local _wrksrc="$wrksrc${build_wrksrc:+/$build_wrksrc}"
 case "$build_style" in
 cmake)
-	CFLAGS="${CFLAGS} -fdebug-prefix-map=$_wrksrc/${cmake_builddir:-build}=."
-	CXXFLAGS="${CXXFLAGS} -fdebug-prefix-map=$_wrksrc/${cmake_builddir:-build}=."
+	CFLAGS="${CFLAGS} -ffile-prefix-map=$_wrksrc/${cmake_builddir:-build}=."
+	CXXFLAGS="${CXXFLAGS} -ffile-prefix-map=$_wrksrc/${cmake_builddir:-build}=."
 	;;
 meson)
-	CFLAGS="${CFLAGS} -fdebug-prefix-map=$_wrksrc/${meson_builddir:-build}=."
-	CXXFLAGS="${CXXFLAGS} -fdebug-prefix-map=$_wrksrc/${meson_builddir:-build}=."
+	CFLAGS="${CFLAGS} -ffile-prefix-map=$_wrksrc/${meson_builddir:-build}=."
+	CXXFLAGS="${CXXFLAGS} -ffile-prefix-map=$_wrksrc/${meson_builddir:-build}=."
 	;;
 *)
-	CFLAGS="${CFLAGS} -fdebug-prefix-map=$_wrksrc=."
-	CXXFLAGS="${CXXFLAGS} -fdebug-prefix-map=$_wrksrc=."
+	CFLAGS="${CFLAGS} -ffile-prefix-map=$_wrksrc=."
+	CXXFLAGS="${CXXFLAGS} -ffile-prefix-map=$_wrksrc=."
 esac
 
 unset _wrksrc

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PR PATCH] [Updated] environment: set -ffile-prefix-map
  2022-10-23  0:50 [PR PATCH] environment: set -ffile-prefix-map sgn
@ 2022-11-09  1:09 ` sgn
  2022-11-30 16:23 ` sgn
  2023-01-05  1:23 ` [PR PATCH] [Merged]: " sgn
  2 siblings, 0 replies; 4+ messages in thread
From: sgn @ 2022-11-09  1:09 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1717 bytes --]

There is an updated pull request by sgn against master on the void-packages repository

https://github.com/sgn/void-packages common-prefix-map
https://github.com/void-linux/void-packages/pull/40120

environment: set -ffile-prefix-map
We're setting -fdebug-prefix-map to strip directory prefixes from debug info, which will help ccache and reproducibility.

However, -fdebug-prefix-map doesn't help with those macros like __FILE__ and __BASE_FILE__, which needs another flags: -fmacro-prefix-map.

Replaces -fdebug-prefix-map with -ffile-prefix-map which is an alias for both `-fdebug-prefix-map` and `-fmacro-prefix-map`. (This flag is available since GCC 8 and Clang 10)

<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES**|**briefly**|**NO**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/40120.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-common-prefix-map-40120.patch --]
[-- Type: text/x-diff, Size: 2925 bytes --]

From 96754559a921520aad941a7f676821bc4bd63cbb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Sun, 23 Oct 2022 07:32:23 +0700
Subject: [PATCH 1/2] environment: set -ffile-prefix-map

We're setting -fdebug-prefix-map to strip directory prefixes from debug
info, which will help ccache and reproducibility.

However, -fdebug-prefix-map doesn't help with those macros like __FILE__
and __BASE_FILE__, which needs another flags: -fmacro-prefix-map.

Replaces -fdebug-prefix-map with -ffile-prefix-map which is an alias for
both `-fdebug-prefix-map` and `-fmacro-prefix-map`. (This flag is
available since GCC 8 and Clang 10)
---
 .../environment/configure/debug-debug-prefix-map.sh  | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/common/environment/configure/debug-debug-prefix-map.sh b/common/environment/configure/debug-debug-prefix-map.sh
index 40b3a7b46bcc..d7eb0402f18b 100644
--- a/common/environment/configure/debug-debug-prefix-map.sh
+++ b/common/environment/configure/debug-debug-prefix-map.sh
@@ -1,16 +1,16 @@
 local _wrksrc="$wrksrc${build_wrksrc:+/$build_wrksrc}"
 case "$build_style" in
 cmake)
-	CFLAGS="${CFLAGS} -fdebug-prefix-map=$_wrksrc/${cmake_builddir:-build}=."
-	CXXFLAGS="${CXXFLAGS} -fdebug-prefix-map=$_wrksrc/${cmake_builddir:-build}=."
+	CFLAGS="${CFLAGS} -ffile-prefix-map=$_wrksrc/${cmake_builddir:-build}=."
+	CXXFLAGS="${CXXFLAGS} -ffile-prefix-map=$_wrksrc/${cmake_builddir:-build}=."
 	;;
 meson)
-	CFLAGS="${CFLAGS} -fdebug-prefix-map=$_wrksrc/${meson_builddir:-build}=."
-	CXXFLAGS="${CXXFLAGS} -fdebug-prefix-map=$_wrksrc/${meson_builddir:-build}=."
+	CFLAGS="${CFLAGS} -ffile-prefix-map=$_wrksrc/${meson_builddir:-build}=."
+	CXXFLAGS="${CXXFLAGS} -ffile-prefix-map=$_wrksrc/${meson_builddir:-build}=."
 	;;
 *)
-	CFLAGS="${CFLAGS} -fdebug-prefix-map=$_wrksrc=."
-	CXXFLAGS="${CXXFLAGS} -fdebug-prefix-map=$_wrksrc=."
+	CFLAGS="${CFLAGS} -ffile-prefix-map=$_wrksrc=."
+	CXXFLAGS="${CXXFLAGS} -ffile-prefix-map=$_wrksrc=."
 esac
 
 unset _wrksrc

From 409fcce2432df8164ee944b220800b26c4640673 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Mon, 7 Nov 2022 16:26:46 +0700
Subject: [PATCH 2/2] python3: strip -ffile-prefix-map too

---
 srcpkgs/python3/template | 1 +
 1 file changed, 1 insertion(+)

diff --git a/srcpkgs/python3/template b/srcpkgs/python3/template
index 335e2cc02d1a..2eddb5bc62bb 100644
--- a/srcpkgs/python3/template
+++ b/srcpkgs/python3/template
@@ -121,6 +121,7 @@ do_install() {
 			${DESTDIR}/usr/bin/python${version%.*}-config
 	fi
 	sed -i -e "s,-fdebug-prefix-map=[^[:space:]]*=[.],," \
+		-e "s,-ffile-prefix-map=[^[:space:]]*=[.],," \
 		-e "s,-I./External,," \
 		${DESTDIR}/usr/bin/python${version%.*}-config \
 		${DESTDIR}/usr/lib/python${version%.*}/_sysconfigdata_*_*.py \

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PR PATCH] [Updated] environment: set -ffile-prefix-map
  2022-10-23  0:50 [PR PATCH] environment: set -ffile-prefix-map sgn
  2022-11-09  1:09 ` [PR PATCH] [Updated] " sgn
@ 2022-11-30 16:23 ` sgn
  2023-01-05  1:23 ` [PR PATCH] [Merged]: " sgn
  2 siblings, 0 replies; 4+ messages in thread
From: sgn @ 2022-11-30 16:23 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1717 bytes --]

There is an updated pull request by sgn against master on the void-packages repository

https://github.com/sgn/void-packages common-prefix-map
https://github.com/void-linux/void-packages/pull/40120

environment: set -ffile-prefix-map
We're setting -fdebug-prefix-map to strip directory prefixes from debug info, which will help ccache and reproducibility.

However, -fdebug-prefix-map doesn't help with those macros like __FILE__ and __BASE_FILE__, which needs another flags: -fmacro-prefix-map.

Replaces -fdebug-prefix-map with -ffile-prefix-map which is an alias for both `-fdebug-prefix-map` and `-fmacro-prefix-map`. (This flag is available since GCC 8 and Clang 10)

<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES**|**briefly**|**NO**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/40120.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-common-prefix-map-40120.patch --]
[-- Type: text/x-diff, Size: 2925 bytes --]

From 2b089ed086d5c51f8c013b4721b4712e9c519fcf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Sun, 23 Oct 2022 07:32:23 +0700
Subject: [PATCH 1/2] environment: set -ffile-prefix-map

We're setting -fdebug-prefix-map to strip directory prefixes from debug
info, which will help ccache and reproducibility.

However, -fdebug-prefix-map doesn't help with those macros like __FILE__
and __BASE_FILE__, which needs another flags: -fmacro-prefix-map.

Replaces -fdebug-prefix-map with -ffile-prefix-map which is an alias for
both `-fdebug-prefix-map` and `-fmacro-prefix-map`. (This flag is
available since GCC 8 and Clang 10)
---
 .../environment/configure/debug-debug-prefix-map.sh  | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/common/environment/configure/debug-debug-prefix-map.sh b/common/environment/configure/debug-debug-prefix-map.sh
index 40b3a7b46bcc..d7eb0402f18b 100644
--- a/common/environment/configure/debug-debug-prefix-map.sh
+++ b/common/environment/configure/debug-debug-prefix-map.sh
@@ -1,16 +1,16 @@
 local _wrksrc="$wrksrc${build_wrksrc:+/$build_wrksrc}"
 case "$build_style" in
 cmake)
-	CFLAGS="${CFLAGS} -fdebug-prefix-map=$_wrksrc/${cmake_builddir:-build}=."
-	CXXFLAGS="${CXXFLAGS} -fdebug-prefix-map=$_wrksrc/${cmake_builddir:-build}=."
+	CFLAGS="${CFLAGS} -ffile-prefix-map=$_wrksrc/${cmake_builddir:-build}=."
+	CXXFLAGS="${CXXFLAGS} -ffile-prefix-map=$_wrksrc/${cmake_builddir:-build}=."
 	;;
 meson)
-	CFLAGS="${CFLAGS} -fdebug-prefix-map=$_wrksrc/${meson_builddir:-build}=."
-	CXXFLAGS="${CXXFLAGS} -fdebug-prefix-map=$_wrksrc/${meson_builddir:-build}=."
+	CFLAGS="${CFLAGS} -ffile-prefix-map=$_wrksrc/${meson_builddir:-build}=."
+	CXXFLAGS="${CXXFLAGS} -ffile-prefix-map=$_wrksrc/${meson_builddir:-build}=."
 	;;
 *)
-	CFLAGS="${CFLAGS} -fdebug-prefix-map=$_wrksrc=."
-	CXXFLAGS="${CXXFLAGS} -fdebug-prefix-map=$_wrksrc=."
+	CFLAGS="${CFLAGS} -ffile-prefix-map=$_wrksrc=."
+	CXXFLAGS="${CXXFLAGS} -ffile-prefix-map=$_wrksrc=."
 esac
 
 unset _wrksrc

From 3493cf6ecfa13a6f3f82d6fa8460ae1d6a058a5d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Mon, 7 Nov 2022 16:26:46 +0700
Subject: [PATCH 2/2] python3: strip -ffile-prefix-map too

---
 srcpkgs/python3/template | 1 +
 1 file changed, 1 insertion(+)

diff --git a/srcpkgs/python3/template b/srcpkgs/python3/template
index 335e2cc02d1a..2eddb5bc62bb 100644
--- a/srcpkgs/python3/template
+++ b/srcpkgs/python3/template
@@ -121,6 +121,7 @@ do_install() {
 			${DESTDIR}/usr/bin/python${version%.*}-config
 	fi
 	sed -i -e "s,-fdebug-prefix-map=[^[:space:]]*=[.],," \
+		-e "s,-ffile-prefix-map=[^[:space:]]*=[.],," \
 		-e "s,-I./External,," \
 		${DESTDIR}/usr/bin/python${version%.*}-config \
 		${DESTDIR}/usr/lib/python${version%.*}/_sysconfigdata_*_*.py \

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PR PATCH] [Merged]: environment: set -ffile-prefix-map
  2022-10-23  0:50 [PR PATCH] environment: set -ffile-prefix-map sgn
  2022-11-09  1:09 ` [PR PATCH] [Updated] " sgn
  2022-11-30 16:23 ` sgn
@ 2023-01-05  1:23 ` sgn
  2 siblings, 0 replies; 4+ messages in thread
From: sgn @ 2023-01-05  1:23 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1559 bytes --]

There's a merged pull request on the void-packages repository

environment: set -ffile-prefix-map
https://github.com/void-linux/void-packages/pull/40120

Description:
We're setting -fdebug-prefix-map to strip directory prefixes from debug info, which will help ccache and reproducibility.

However, -fdebug-prefix-map doesn't help with those macros like __FILE__ and __BASE_FILE__, which needs another flags: -fmacro-prefix-map.

Replaces -fdebug-prefix-map with -ffile-prefix-map which is an alias for both `-fdebug-prefix-map` and `-fmacro-prefix-map`. (This flag is available since GCC 8 and Clang 10)

<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES**|**briefly**|**NO**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-01-05  1:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-23  0:50 [PR PATCH] environment: set -ffile-prefix-map sgn
2022-11-09  1:09 ` [PR PATCH] [Updated] " sgn
2022-11-30 16:23 ` sgn
2023-01-05  1:23 ` [PR PATCH] [Merged]: " sgn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).