Merge pull request #111 from nolta/develop

fix a couple of FreeBSD issues
This commit is contained in:
zchothia 2012-05-21 14:44:20 -07:00
commit 33941033e2
4 changed files with 8 additions and 8 deletions

View File

@ -282,7 +282,7 @@ REALNAME:
#define EPILOGUE .end REALNAME
#endif
#if defined(OS_LINUX) || defined(OS_FreeBSD) || defined(OS_NetBSD) || defined(__ELF__)
#if defined(OS_LINUX) || defined(OS_FREEBSD) || defined(OS_NetBSD) || defined(__ELF__)
#define PROLOGUE \
.text; \
.align 16; \

View File

@ -353,7 +353,7 @@ REALNAME:
#define EPILOGUE .end REALNAME
#endif
#if defined(OS_LINUX) || defined(OS_FreeBSD) || defined(OS_NetBSD) || defined(__ELF__) || defined(C_PGI)
#if defined(OS_LINUX) || defined(OS_FREEBSD) || defined(OS_NetBSD) || defined(__ELF__) || defined(C_PGI)
#define PROLOGUE \
.text; \
.align 512; \

View File

@ -103,7 +103,7 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <sys/syscall.h>
#endif
#if defined(OS_FreeBSD) || defined(OS_Darwin)
#if defined(OS_FREEBSD) || defined(OS_Darwin)
#include <sys/sysctl.h>
#endif
@ -185,7 +185,7 @@ int get_num_procs(void) {
#endif
#if defined(OS_FreeBSD) || defined(OS_Darwin)
#if defined(OS_FREEBSD) || defined(OS_Darwin)
int get_num_procs(void) {
@ -215,7 +215,7 @@ int goto_get_num_procs (void) {
int blas_get_cpu_number(void){
char *p;
#if defined(OS_LINUX) || defined(OS_WINDOWS) || defined(OS_FreeBSD) || defined(OS_Darwin)
#if defined(OS_LINUX) || defined(OS_WINDOWS) || defined(OS_FREEBSD) || defined(OS_Darwin)
int max_num;
#endif
int blas_goto_num = 0;
@ -223,7 +223,7 @@ int blas_get_cpu_number(void){
if (blas_num_threads) return blas_num_threads;
#if defined(OS_LINUX) || defined(OS_WINDOWS) || defined(OS_FreeBSD) || defined(OS_Darwin)
#if defined(OS_LINUX) || defined(OS_WINDOWS) || defined(OS_FREEBSD) || defined(OS_Darwin)
max_num = get_num_procs();
#endif
@ -250,7 +250,7 @@ int blas_get_cpu_number(void){
else if (blas_omp_num > 0) blas_num_threads = blas_omp_num;
else blas_num_threads = MAX_CPU_NUMBER;
#if defined(OS_LINUX) || defined(OS_WINDOWS) || defined(OS_FreeBSD) || defined(OS_Darwin)
#if defined(OS_LINUX) || defined(OS_WINDOWS) || defined(OS_FREEBSD) || defined(OS_Darwin)
if (blas_num_threads > max_num) blas_num_threads = max_num;
#endif

View File

@ -121,7 +121,7 @@ so : ../$(LIBSONAME)
../$(LIBSONAME) : ../$(LIBNAME) linux.def linktest.c
$(CC) $(CFLAGS) -shared -o ../$(LIBSONAME) \
-Wl,--whole-archive ../$(LIBNAME) -Wl,--no-whole-archive \
-Wl,--retain-symbols-file=linux.def $(EXTRALIB)
-Wl,--retain-symbols-file=linux.def $(FEXTRALIB) $(EXTRALIB)
$(CC) $(CFLAGS) -w -o linktest linktest.c ../$(LIBSONAME) $(FEXTRALIB) && echo OK.
rm -f linktest