hrev52019 adds 2 changesets to branch 'master'
old head: 64d4515abfc8f89e37f7fd386e73dd6748f9546e
new head: 77c8afb47f226476057898672cde7331d4a2e20a
overview:
https://git.haiku-os.org/haiku/log/?qt=range&q=77c8afb47f22+%5E64d4515abfc8
----------------------------------------------------------------------------
d2845248154c: libroot_build: replace void* with addr_t for hidden functions.
* Using attribute visibility hidden doesn't get applied if a
function returns a non-class pointer type, so the functions
weren't being hidden for gcc4+ builds, resulting in stack
overflows. Using addr_t, which should be the same size as
void* works around this restriction.
77c8afb47f22: libroot_build: don't define system_time() on Haiku host.
* On x86_64, this was causing an infinite loop between
libroot & libroot_build in the host unzip tool.
[ Jessica Hamilton <jessica.l.hamilton@xxxxxxxxx> ]
----------------------------------------------------------------------------
2 files changed, 10 insertions(+), 8 deletions(-)
src/build/libroot/function_remapper.cpp | 16 ++++++++--------
src/build/libroot/misc.cpp | 2 ++
############################################################################
Commit: d2845248154c484818d2750d43427def4e1d75b3
URL: https://git.haiku-os.org/haiku/commit/?id=d2845248154c
Author: Jessica Hamilton <jessica.l.hamilton@xxxxxxxxx>
Date: Tue Jun 12 18:52:59 2018 UTC
libroot_build: replace void* with addr_t for hidden functions.
* Using attribute visibility hidden doesn't get applied if a
function returns a non-class pointer type, so the functions
weren't being hidden for gcc4+ builds, resulting in stack
overflows. Using addr_t, which should be the same size as
void* works around this restriction.
----------------------------------------------------------------------------
diff --git a/src/build/libroot/function_remapper.cpp
b/src/build/libroot/function_remapper.cpp
index e074dac0ea..247010ab88 100644
--- a/src/build/libroot/function_remapper.cpp
+++ b/src/build/libroot/function_remapper.cpp
@@ -282,30 +282,30 @@ renameat(int fromFD, const char* from, int toFD, const
char* to)
// fs_attr_* functions only need to be remapped on Haiku
-extern "C" void* HIDDEN_FUNCTION_ATTRIBUTE
+extern "C" addr_t HIDDEN_FUNCTION_ATTRIBUTE
fs_open_attr_dir(const char *path)
{
HIDDEN_FUNCTION(fs_open_attr_dir);
- return _haiku_build_fs_open_attr_dir(path);
+ return (addr_t)_haiku_build_fs_open_attr_dir(path);
}
-extern "C" void* HIDDEN_FUNCTION_ATTRIBUTE
+extern "C" addr_t HIDDEN_FUNCTION_ATTRIBUTE
fs_lopen_attr_dir(const char *path)
{
HIDDEN_FUNCTION(fs_lopen_attr_dir);
- return _haiku_build_fs_lopen_attr_dir(path);
+ return (addr_t)_haiku_build_fs_lopen_attr_dir(path);
}
-extern "C" void* HIDDEN_FUNCTION_ATTRIBUTE
+extern "C" addr_t HIDDEN_FUNCTION_ATTRIBUTE
fs_fopen_attr_dir(int fd)
{
HIDDEN_FUNCTION(fs_fopen_attr_dir);
- return _haiku_build_fs_fopen_attr_dir(fd);
+ return (addr_t)_haiku_build_fs_fopen_attr_dir(fd);
}
@@ -318,12 +318,12 @@ fs_close_attr_dir(void *dir)
}
-extern "C" void* HIDDEN_FUNCTION_ATTRIBUTE
+extern "C" addr_t HIDDEN_FUNCTION_ATTRIBUTE
fs_read_attr_dir(void *dir)
{
HIDDEN_FUNCTION(fs_read_attr_dir);
- return _haiku_build_fs_read_attr_dir(dir);
+ return (addr_t)_haiku_build_fs_read_attr_dir(dir);
}
############################################################################
Revision: hrev52019
Commit: 77c8afb47f226476057898672cde7331d4a2e20a
URL: https://git.haiku-os.org/haiku/commit/?id=77c8afb47f22
Author: Jessica Hamilton <jessica.l.hamilton@xxxxxxxxx>
Date: Sat Jun 16 09:02:08 2018 UTC
libroot_build: don't define system_time() on Haiku host.
* On x86_64, this was causing an infinite loop between
libroot & libroot_build in the host unzip tool.
----------------------------------------------------------------------------
diff --git a/src/build/libroot/misc.cpp b/src/build/libroot/misc.cpp
index 52c74f6f08..7bc51398cc 100644
--- a/src/build/libroot/misc.cpp
+++ b/src/build/libroot/misc.cpp
@@ -32,6 +32,7 @@ _debuggerAssert(const char *file, int line, const char
*expression)
return 0;
}
+#ifndef HAIKU_HOST_PLATFORM_HAIKU
// system_time
bigtime_t
system_time(void)
@@ -40,6 +41,7 @@ system_time(void)
gettimeofday(&tm, NULL);
return (int64)tm.tv_sec * 1000000LL + (int64)tm.tv_usec;
}
+#endif
// snooze
status_t