hrev54127 adds 1 changeset to branch 'master'
old head: c39f9cc82791d486313f31a08295b42d782f1f0c
new head: 7a617f59fd64449167bb190666bd44fae7efbe0b
overview:
https://git.haiku-os.org/haiku/log/?qt=range&q=7a617f59fd64+%5Ec39f9cc82791
----------------------------------------------------------------------------
7a617f59fd64: configure & build: Add basic support for building with MSYS.
Also remove the MINGW support, as it was far too incomplete.
This *should* work under case-sensitive NTFS, but instead,
it seems #14963 occurs. So perhaps there is a GCC bug
related to case-sensitive vs. case-insensitivity after all.
[ Augustin Cavalier <waddlesplash@xxxxxxxxx> ]
----------------------------------------------------------------------------
Revision: hrev54127
Commit: 7a617f59fd64449167bb190666bd44fae7efbe0b
URL: https://git.haiku-os.org/haiku/commit/?id=7a617f59fd64
Author: Augustin Cavalier <waddlesplash@xxxxxxxxx>
Date: Sun May 3 17:24:26 2020 UTC
Ticket: https://dev.haiku-os.org/ticket/14963
----------------------------------------------------------------------------
7 files changed, 13 insertions(+), 50 deletions(-)
build/jam/BuildSetup | 6 +++---
build/jam/MainBuildRules | 3 ---
configure | 4 ++--
headers/build/BeOSBuildCompatibility.h | 29 +++++------------------------
headers/build/host/mingw/endian.h | 15 ---------------
src/build/libroot/fs_attr_generic.cpp | 2 +-
src/build/libsolv/Jamfile | 4 ++--
----------------------------------------------------------------------------
diff --git a/build/jam/BuildSetup b/build/jam/BuildSetup
index 8a3bf05663..4bab597a48 100644
--- a/build/jam/BuildSetup
+++ b/build/jam/BuildSetup
@@ -216,7 +216,7 @@ HOST_UNARFLAGS ?= x ;
# check the host platform compatibility
SetPlatformCompatibilityFlagVariables HOST_PLATFORM : HOST : host
- : linux openbsd freebsd darwin mingw ;
+ : linux openbsd freebsd darwin msys ;
HOST_PLATFORM_(host)_COMPATIBLE = 1 ;
if $(HOST_PLATFORM) = linux || $(HOST_PLATFORM) = freebsd
@@ -400,7 +400,7 @@ if $(HOST_PLATFORM_HAIKU_COMPATIBLE) {
} else {
HOST_LINKFLAGS += -lm -ldl ;
HOST_LIBSTDC++ = stdc++ ;
- if $(HOST_PLATFORM) = mingw {
+ if $(HOST_PLATFORM) = msys {
HOST_ADD_BUILD_COMPATIBILITY_LIB_DIR
= "PATH=$PATH:$(HOST_BUILD_COMPATIBILITY_LIB_DIR)" ;
} else if $(HOST_PLATFORM) = darwin {
@@ -635,7 +635,7 @@ switch $(HOST_PLATFORM) {
case linux : HOST_DEFINES += HAIKU_HOST_PLATFORM_LINUX ;
case freebsd : HOST_DEFINES += HAIKU_HOST_PLATFORM_FREEBSD ;
case darwin : HOST_DEFINES += HAIKU_HOST_PLATFORM_DARWIN ;
- case mingw : HOST_DEFINES += HAIKU_HOST_PLATFORM_MINGW ;
+ case msys : HOST_DEFINES += HAIKU_HOST_PLATFORM_MSYS ;
}
# define host platform 64 bit macro
diff --git a/build/jam/MainBuildRules b/build/jam/MainBuildRules
index 800f91ade5..811981e8f5 100644
--- a/build/jam/MainBuildRules
+++ b/build/jam/MainBuildRules
@@ -686,9 +686,6 @@ rule BuildPlatformSharedLibrary
if $(HOST_PLATFORM) = darwin {
LINKFLAGS on $(target) = [ on $(target) return $(LINKFLAGS) ]
-dynamic -dynamiclib -Xlinker -flat_namespace ;
- } else if $(HOST_PLATFORM) = mingw {
- LINKFLAGS on $(target) = [ on $(target) return $(LINKFLAGS) ]
- -shared -Xlinker --allow-multiple-definition ;
} else {
LINKFLAGS on $(target) = [ on $(target) return $(LINKFLAGS) ]
-shared -Xlinker -soname=\"$(target:G=)\" ;
diff --git a/configure b/configure
index 1e19d7a857..4bf2fbb22f 100755
--- a/configure
+++ b/configure
@@ -434,7 +434,7 @@ check_native_xattrs()
xattr_set="setextattr"; xattr_set_args="user \$NAME
\"\$VALUE\""
xattr_get="getextattr"; xattr_get_args="user \$NAME"
;;
- linux)
+ linux|msys)
xattr_set="setfattr"; xattr_set_args="-n user.\$NAME -v
\"\$VALUE\""
xattr_get="getfattr"; xattr_get_args="-n user.\$NAME"
;;
@@ -585,7 +585,7 @@ case "${platform}" in
Haiku) HOST_PLATFORM=haiku_host ;;
Linux) HOST_PLATFORM=linux ;;
OpenBSD) HOST_PLATFORM=openbsd ;;
- MINGW*) HOST_PLATFORM=mingw ;;
+ MSYS*) HOST_PLATFORM=msys ;;
*) echo Unsupported platform: ${platform}
exit 1 ;;
esac
diff --git a/headers/build/BeOSBuildCompatibility.h
b/headers/build/BeOSBuildCompatibility.h
index 9217c34102..8a6b8ff571 100644
--- a/headers/build/BeOSBuildCompatibility.h
+++ b/headers/build/BeOSBuildCompatibility.h
@@ -1,22 +1,7 @@
#ifndef BEOS_BUILD_COMPATIBILITY_H
#define BEOS_BUILD_COMPATIBILITY_H
-// These things have to be done before anything is included
-#if defined(HAIKU_HOST_PLATFORM_MINGW)
-#define _MODE_T_
-#define _POSIX_
-typedef int mode_t;
-
-#include <stdint.h>
-#include <limits.h>
-typedef uint32_t uid_t;
-typedef uint32_t gid_t;
-
-#include <io.h>
-#define mkdir(path, mode) mkdir(path)
-#endif
-
-// DEFFILEMODE is not available on MinGW and on platforms with MUSL
+// DEFFILEMODE is not available on platforms with MUSL
#ifndef DEFFILEMODE
#define DEFFILEMODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)
#endif
@@ -33,6 +18,10 @@ typedef uint32_t gid_t;
typedef unsigned long haiku_build_addr_t;
#define addr_t haiku_build_addr_t
+#if defined(HAIKU_HOST_PLATFORM_MSYS)
+#define __addr_t_defined
+#endif
+
#include <Errors.h>
#include <fcntl.h>
@@ -41,10 +30,7 @@ typedef unsigned long haiku_build_addr_t;
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
-
-#if !defined(HAIKU_HOST_PLATFORM_MINGW)
#include <sys/uio.h>
-#endif
#ifdef __cplusplus
extern "C" {
@@ -62,11 +48,6 @@ extern size_t strlcat(char* dest, const char* source,
size_t length);
extern size_t strnlen(const char* string, size_t length);
#endif
-#if defined(HAIKU_HOST_PLATFORM_MINGW)
-extern char* stpcpy(char* dest, const char* src);
-extern char* strcasestr(const char* s, const char* find);
-#endif
-
// BeOS only
extern ssize_t read_pos(int fd, off_t pos, void* buffer, size_t count);
extern ssize_t write_pos(int fd, off_t pos, const void* buffer, size_t count);
diff --git a/headers/build/host/mingw/endian.h
b/headers/build/host/mingw/endian.h
deleted file mode 100644
index 912957b372..0000000000
--- a/headers/build/host/mingw/endian.h
+++ /dev/null
@@ -1,15 +0,0 @@
-#ifndef _HAIKU_BUILD_COMPATIBILITY_MINGW_ENDIAN
-#define _HAIKU_BUILD_COMPATIBILITY_MINGW_ENDIAN
-
-
-// There's no <endian.h> in MinGW.
-
-#include <sys/param.h>
-
-#define __LITTLE_ENDIAN LITTLE_ENDIAN
-#define __BIG_ENDIAN BIG_ENDIAN
-
-#define __BYTE_ORDER BYTE_ORDER
-
-
-#endif // _HAIKU_BUILD_COMPATIBILITY_MINGW_ENDIAN
diff --git a/src/build/libroot/fs_attr_generic.cpp
b/src/build/libroot/fs_attr_generic.cpp
index a86d4d555e..6c58544857 100644
--- a/src/build/libroot/fs_attr_generic.cpp
+++ b/src/build/libroot/fs_attr_generic.cpp
@@ -21,7 +21,7 @@
// Include the interface to the host platform attributes support, if it shall
be
// used to tag files with unique IDs to identify their attribute directory.
#if HAIKU_HOST_USE_XATTR_REF
-# if defined(HAIKU_HOST_PLATFORM_LINUX)
+# if defined(HAIKU_HOST_PLATFORM_LINUX) ||
defined(HAIKU_HOST_PLATFORM_MSYS)
# include "fs_attr_xattr.h"
# elif defined(HAIKU_HOST_PLATFORM_FREEBSD)
# include "fs_attr_extattr.h"
diff --git a/src/build/libsolv/Jamfile b/src/build/libsolv/Jamfile
index 5571267b4b..e087788de9 100644
--- a/src/build/libsolv/Jamfile
+++ b/src/build/libsolv/Jamfile
@@ -33,8 +33,8 @@ switch $(HOST_PLATFORM) {
DEFINES += HAVE_STRCHRNUL HAVE_FUNOPEN ;
case darwin :
DEFINES += HAVE_FUNOPEN HAVE_QSORT_R ;
- case mingw :
- DEFINES += ;
+ case msys :
+ DEFINES += HAVE_STRCHRNUL HAVE_QSORT_R HAVE_FOPENCOOKIE ;
case * :
Exit $(SUBDIR)/Jamfile: "Please add a case for your platform"
"($(HOST_PLATFORM))!" ;