From cb14fcb8788b639e1fe718a81bb4109230ad6d77 Mon Sep 17 00:00:00 2001 From: Andreas Tobler Date: Fri, 1 Jan 2010 12:32:24 +0000 Subject: [PATCH] Add openbsd support. From-SVN: r155549 --- libffi/ChangeLog | 7 +++++++ libffi/configure | 2 +- libffi/configure.ac | 2 +- libffi/testsuite/lib/libffi-dg.exp | 6 +++++- 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/libffi/ChangeLog b/libffi/ChangeLog index d8412aa066a7..0834d035cd43 100644 --- a/libffi/ChangeLog +++ b/libffi/ChangeLog @@ -1,3 +1,10 @@ +2009-12-26 Andreas Tobler + + * configure.ac: Add amd64-*-openbsd*. + * configure: Rebuilt. + * testsuite/lib/libffi-dg.exp (libffi_target_compile): Link + openbsd programs with -lpthread. + 2009-12-26 Anthony Green * testsuite/libffi.call/cls_double_va.c, diff --git a/libffi/configure b/libffi/configure index b849fe32c1c1..5ab81bd4183e 100755 --- a/libffi/configure +++ b/libffi/configure @@ -11328,7 +11328,7 @@ case "$host" in TARGET=ARM; TARGETDIR=arm ;; - amd64-*-freebsd*) + amd64-*-freebsd* | amd64-*-openbsd*) TARGET=X86_64; TARGETDIR=x86 ;; diff --git a/libffi/configure.ac b/libffi/configure.ac index a3988395bcce..b663076c1133 100644 --- a/libffi/configure.ac +++ b/libffi/configure.ac @@ -51,7 +51,7 @@ case "$host" in TARGET=ARM; TARGETDIR=arm ;; - amd64-*-freebsd*) + amd64-*-freebsd* | amd64-*-openbsd*) TARGET=X86_64; TARGETDIR=x86 ;; diff --git a/libffi/testsuite/lib/libffi-dg.exp b/libffi/testsuite/lib/libffi-dg.exp index 8db38c286a83..bd5a7c84f48e 100644 --- a/libffi/testsuite/lib/libffi-dg.exp +++ b/libffi/testsuite/lib/libffi-dg.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2003, 2005, 2009 Free Software Foundation, Inc. +# Copyright (C) 2003, 2005, 2008, 2009, 2010 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -203,6 +203,10 @@ proc libffi_target_compile { source dest type options } { lappend options "libs= -shared-libgcc" } + if { [string match "*-*-openbsd*" $target_triplet] } { + lappend options "libs= -lpthread" + } + lappend options "libs= -lffi" verbose "options: $options"