pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/mk



Module Name:    pkgsrc
Committed By:   riastradh
Date:           Wed Jun  5 17:17:21 UTC 2024

Modified Files:
        pkgsrc/mk: bsd.prefs.mk

Log Message:
bsd.prefs.mk: Work around Cygwin OBJECT_FMT mistake in bsd.own.mk.

We should maybe isolate this OBJECT_FMT detection in a way that it
can be written down once, not 2-3 times in bsd.prefs.mk and
bsd.own.mk.

Part of the reason it is duplicated now is because it is done
separately for NATIVE_OBJECT_FMT (the object format used by native
packages we're running) and OBJECT_FMT (the object format used by
packages we're building, which may be cross-built).

The same treatment may be required for AIX, OSF/1, and HP-UX, for
which bsd.prefs.mk sets a non-ELF OBJECT_FMT, but for which
bsd.own.mk appears to incorrectly set OBJECT_FMT=ELF too like it does
for Cygwin and Darwin.

No functional change intended on non-Cygwin platforms because this is
conditional on ${NATIVE_OPSYS} == "Cygwin".

PR pkg/58315: pkgsrc reports "object format ``PE'' which differs from ``ELF''" in cygwin


To generate a diff of this commit:
cvs rdiff -u -r1.448 -r1.449 pkgsrc/mk/bsd.prefs.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/mk/bsd.prefs.mk
diff -u pkgsrc/mk/bsd.prefs.mk:1.448 pkgsrc/mk/bsd.prefs.mk:1.449
--- pkgsrc/mk/bsd.prefs.mk:1.448        Tue Apr 16 21:15:45 2024
+++ pkgsrc/mk/bsd.prefs.mk      Wed Jun  5 17:17:21 2024
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.prefs.mk,v 1.448 2024/04/16 21:15:45 riastradh Exp $
+# $NetBSD: bsd.prefs.mk,v 1.449 2024/06/05 17:17:21 riastradh Exp $
 #
 # This file includes the mk.conf file, which contains the user settings.
 #
@@ -406,8 +406,13 @@ TARGET_MACHINE_PLATFORM=   ${TARGET_OPSYS}
 .endif
 
 # Set this before <bsd.own.mk> does, since it doesn't know about Darwin
+# or Cygwin (XXX or HP-UX or AIX or OSF/1 or ...).
+#
 # We will later set OBJECT_FMT to be conditional on USE_CROSS_COMPILE.
-.if ${NATIVE_OPSYS} == "Darwin"
+.if ${NATIVE_OPSYS} == "Cygwin"
+NATIVE_OBJECT_FMT?=    PE
+OBJECT_FMT?=           PE
+.elif ${NATIVE_OPSYS} == "Darwin"
 NATIVE_OBJECT_FMT?=    Mach-O
 OBJECT_FMT?=           Mach-O
 .endif



Home | Main Index | Thread Index | Old Index