fix: devel/boost

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

fix: devel/boost

Tobias Ulmer
Fix 'jam' so it doesn't crash immediately on sparc.

While debugging I found file_query wasn't declared, which is nice since
it returns a pointer. Surprised this works at all on 64 bit machines,
I'm guessing it's because of -O0.

More sparc fixes may be coming, or I may mark the thing as BROKEN, we
shall see. I'm just putting it out there so you can see what's cooking.

diff --git a/devel/boost/Makefile b/devel/boost/Makefile
index 5f69adb..6f04d78 100644
--- a/devel/boost/Makefile
+++ b/devel/boost/Makefile
@@ -5,7 +5,7 @@ ONLY_FOR_ARCHS= ${GCC4_ARCHS}
 COMMENT= free peer-reviewed portable C++ source libraries
 
 VERSION= 1.58.0
-REVISION= 0
+REVISION= 1
 DISTNAME= boost_${VERSION:S/./_/g}
 PKGNAME= boost-${VERSION}
 CATEGORIES= devel
diff --git a/devel/boost/patches/patch-tools_build_src_engine_hash_c b/devel/boost/patches/patch-tools_build_src_engine_hash_c
new file mode 100644
index 0000000..ea923e1
--- /dev/null
+++ b/devel/boost/patches/patch-tools_build_src_engine_hash_c
@@ -0,0 +1,14 @@
+$OpenBSD$
+
+padding for 32bit strict alignment archs
+
+--- tools/build/src/engine/hash.c.orig Mon Feb 15 20:11:07 2016
++++ tools/build/src/engine/hash.c Mon Feb 15 20:22:03 2016
+@@ -33,6 +33,7 @@ typedef struct item ITEM;
+ struct item
+ {
+     ITEM * next;
++    char padding[sizeof(long long)-sizeof(ITEM *)];
+ };
+
+ #define MAX_LISTS 32
diff --git a/devel/boost/patches/patch-tools_build_src_engine_modules_path_c b/devel/boost/patches/patch-tools_build_src_engine_modules_path_c
new file mode 100644
index 0000000..4a9a952
--- /dev/null
+++ b/devel/boost/patches/patch-tools_build_src_engine_modules_path_c
@@ -0,0 +1,14 @@
+$OpenBSD$
+
+fix implicit declaration of function 'file_query' for LP64 archs
+
+--- tools/build/src/engine/modules/path.c.orig Mon Feb 15 19:25:09 2016
++++ tools/build/src/engine/modules/path.c Mon Feb 15 19:25:34 2016
+@@ -6,6 +6,7 @@
+
+ #include "../constants.h"
+ #include "../frames.h"
++#include "../filesys.h"
+ #include "../lists.h"
+ #include "../native.h"
+ #include "../timestamp.h"

Reply | Threaded
Open this post in threaded view
|

Re: fix: devel/boost

Christian Weisgerber
On 2016-02-15, Tobias Ulmer <[hidden email]> wrote:

> +padding for 32bit strict alignment archs
> +
> +--- tools/build/src/engine/hash.c.orig Mon Feb 15 20:11:07 2016
> ++++ tools/build/src/engine/hash.c Mon Feb 15 20:22:03 2016
> +@@ -33,6 +33,7 @@ typedef struct item ITEM;
> + struct item
> + {
> +     ITEM * next;
> ++    char padding[sizeof(long long)-sizeof(ITEM *)];
> + };

Urgh.  sparc, as a 32-bit arch, enforces 64-bit alignment for 64-bit
data types?

--
Christian "naddy" Weisgerber                          [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: fix: devel/boost

Tobias Ulmer
On Mon, Feb 15, 2016 at 08:51:34PM +0000, Christian Weisgerber wrote:

> On 2016-02-15, Tobias Ulmer <[hidden email]> wrote:
>
> > +padding for 32bit strict alignment archs
> > +
> > +--- tools/build/src/engine/hash.c.orig Mon Feb 15 20:11:07 2016
> > ++++ tools/build/src/engine/hash.c Mon Feb 15 20:22:03 2016
> > +@@ -33,6 +33,7 @@ typedef struct item ITEM;
> > + struct item
> > + {
> > +     ITEM * next;
> > ++    char padding[sizeof(long long)-sizeof(ITEM *)];
> > + };
>
> Urgh.  sparc, as a 32-bit arch, enforces 64-bit alignment for 64-bit
> data types?

Yes, LDD and STD 'trap if the address is not doubleword-aligned' to
quote the SPARCv8 manual.

>
> --
> Christian "naddy" Weisgerber                          [hidden email]
>