pg.ddx.io pgvector/pgvector GitHub issues and pull requests
help / color / mirror / Atom feed[pgvector/pgvector] PR #764: Avoid -march=native when reproducible build is wanted
4+ messages / 2 participants
[nested] [flat]
* [pgvector/pgvector] PR #764: Avoid -march=native when reproducible build is wanted
@ 2025-01-24 03:13 "bmwiedemann (@bmwiedemann)" <noreply+bmwiedemann@github.com>
0 siblings, 0 replies; 4+ messages in thread
From: bmwiedemann (@bmwiedemann) @ 2025-01-24 03:13 UTC (permalink / raw)
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
With this patch, compilation will avoid `-march=native` when a reproducible build is wanted.
See https://reproducible-builds.org/ for why this is good.
Without this patch, compiling on different machines produced different binaries, which made verification of results difficult.
This patch was done while working on reproducible builds for openSUSE.
inline patch 1: Makefile (+5/-1 lines) download inline-1.patch
diff --git a/Makefile b/Makefile
index 7a4b88caf..4681d0f7e 100644
--- a/Makefile
+++ b/Makefile
@@ -12,7 +12,11 @@ REGRESS = $(patsubst test/sql/%.sql,%,$(TESTS))
REGRESS_OPTS = --inputdir=test --load-extension=$(EXTENSION)
# To compile for portability, run: make OPTFLAGS=""
-OPTFLAGS = -march=native
+ifdef SOURCE_DATE_EPOCH
+ OPTFLAGS =
+else
+ OPTFLAGS = -march=native
+endif
# Mac ARM doesn't always support -march=native
ifeq ($(shell uname -s), Darwin)
^ permalink raw [nested|flat] 4+ messages in thread
* Re: [pgvector/pgvector] PR #764: Avoid -march=native when reproducible build is wanted
@ 2025-01-24 07:53 "ankane (@ankane)" <noreply+ankane@github.com>
2 siblings, 0 replies; 4+ messages in thread
From: ankane (@ankane) @ 2025-01-24 07:53 UTC (permalink / raw)
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
Hi @bmwiedemann, thanks for the PR, but you can already set OPTFLAGS="" for this.
^ permalink raw [nested|flat] 4+ messages in thread
* Re: [pgvector/pgvector] PR #764: Avoid -march=native when reproducible build is wanted
@ 2025-01-24 07:53 "ankane (@ankane)" <noreply+ankane@github.com>
2 siblings, 0 replies; 4+ messages in thread
From: ankane (@ankane) @ 2025-01-24 07:53 UTC (permalink / raw)
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
@ankane closed this.
^ permalink raw [nested|flat] 4+ messages in thread
* Re: [pgvector/pgvector] PR #764: Avoid -march=native when reproducible build is wanted
@ 2025-01-24 10:09 "bmwiedemann (@bmwiedemann)" <noreply+bmwiedemann@github.com>
2 siblings, 0 replies; 4+ messages in thread
From: bmwiedemann (@bmwiedemann) @ 2025-01-24 10:09 UTC (permalink / raw)
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
Yes, I saw that in the README, but then every distribution has to discover and apply that (we did not). With this patch on the other hand, it would already be the default for us.
^ permalink raw [nested|flat] 4+ messages in thread
end of thread, other threads:[~2025-01-24 10:09 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2025-01-24 03:13 [pgvector/pgvector] PR #764: Avoid -march=native when reproducible build is wanted "bmwiedemann (@bmwiedemann)" <noreply+bmwiedemann@github.com>
2025-01-24 07:53 ` "ankane (@ankane)" <noreply+ankane@github.com>
2025-01-24 07:53 ` "ankane (@ankane)" <noreply+ankane@github.com>
2025-01-24 10:09 ` "bmwiedemann (@bmwiedemann)" <noreply+bmwiedemann@github.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox