Changeset 22

Show
Ignore:
Timestamp:
04/23/08 07:31:39 (2 months ago)
Author:
hanje04
Message:

#109 Fix up build for x86_64 Linux. Add in-line assembler macros to csnormal.h to replace those previously defined in asm/bitops.h

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • main/src/cl/hdr/hdr/csnormal.h

    r1 r22  
    2626# include <sched.h> 
    2727# endif /* sgi_us5 Linux */ 
    28 # if defined(a64_lnx) 
    29 # define CONFIG_SMP 
    30 # include <asm/bitops.h> 
    31 # endif /* a64_lnx */ 
    3228# endif /* POSIX_THREADS */ 
    3329# endif /* OS_THREADS_USED */ 
     
    18411837**          Replace mg5_osx with OSX and add support for Intel OSX. 
    18421838**          Remove all OSX assembler and implement OSSpinlock calls instead 
     1839**      20-Apr-2008 (hanje04) 
     1840**          Add in-line assembler functions for test_and_set()/clear() 
     1841**          functions. These replace those defined in the now missing 
     1842**          bitops.h 
    18431843*/ 
    18441844 
     
    27352735# if defined(a64_lnx) 
    27362736# define cs_aset_op 
    2737 # define        CS_tas(a)               test_and_set_bit((long) 0, a) 
     2737# define        CS_tas(a)               test_and_set_bit((int) 0, a) 
    27382738# define        CS_ISSET(a)             (*(a) != (CS_ASET)0) 
    27392739# define        CS_ACLR(a)              CS_aclr(a) 
    27402740# define        CS_TAS(a)               (!CS_tas(a)) 
    27412741# define        CS_SPININIT(s)          (MEfill(sizeof(*s),'\0',(char *)s)) 
     2742 
     2743/* 
     2744 * In-line assembler functions for atomic sychronization operations, 
     2745 * based on those previously found in asm-x86_64/bitops.h. File 
     2746 * has been removed from later Linux distributions but functions 
     2747 * are still needed. 
     2748 * Better soln would probably be to use GCC compiler macros but this  
     2749 * requires further investigation. 
     2750*/ 
     2751# define ADDR (*(CS_ASET *) addr) 
     2752static __inline__ void clear_bit(int nr, CS_ASET * addr) 
     2753{ 
     2754        __asm__ __volatile__( "lock;" 
     2755                "btrl %1,%0" 
     2756                :"=m" (ADDR) 
     2757                :"dIr" (nr)); 
     2758} 
     2759static __inline__ int test_and_set_bit(int nr, CS_ASET * addr) 
     2760{ 
     2761        int oldbit; 
     2762 
     2763        __asm__ __volatile__( "lock ;" 
     2764                "btsl %2,%1\n\tsbbl %0,%0" 
     2765                :"=r" (oldbit),"=m" (ADDR) 
     2766                :"dIr" (nr) : "memory"); 
     2767        return oldbit; 
     2768} 
     2769 
    27422770# define CS_getspin(s)                   \ 
    27432771    {                                    \ 
     
    27532781{ 
    27542782        __asm__ __volatile__("": : :"memory"); 
    2755         clear_bit((long) 0, ptr); 
     2783        clear_bit(0, ptr); 
    27562784        __asm__ __volatile__("": : :"memory"); 
    27572785} 
  • main/src/tools/port/jam/Jamrules

    r1 r22  
    10661066#           Add missing readvers.bat dependency information to allow 
    10671067#           .pp files to be built from the local directory. 
     1068#       23-Arp-2008 (hanje04) 
     1069#           Add ability to reference a second location for the Xerces 
     1070#           library on hybrid builds using XERCESLOCHB 
    10681071# 
    10691072##### 
     
    62846287        if $(VERSHB) 
    62856288        {        
    6286                 FILE $(INGLIB)/$(SUFHB)/$(XERCESCLIB) : $(SUFHB)/$(XERCESCLIB) ; 
     6289                if $(XERCESLOCHB) 
     6290                { 
     6291                    XERCESCHBLIB = $(XERCESCLIB:G=hb) ; 
     6292                    XERCESHBLOC = $(XERCESLOCHB) ; 
     6293                } 
     6294                else 
     6295                { 
     6296                    XERCESCHBLIB = $(SUFHB)/$(XERCESCLIB) ; 
     6297                    XERCESHBLOC = $(XERCESLOC) ; 
     6298                } 
     6299                FILE $(INGLIB)/$(SUFHB)/$(XERCESCLIB) : $(XERCESCHBLIB) ; 
    62876300                _LINK $(SUFHB)/$(<) : $(INGLIB)/$(SUFHB)/$(XERCESCLIB) ; 
    62886301                _LINK $(SUFHB)/$(<:S=.$(SLSFX).$(XERCVERS)) : $(INGLIB)/$(SUFHB)/$(XERCESCLIB) ; 
    62896302 
    6290                 DEPENDS $(SUFHB)/$(<:S=.$(SLSFX).$(XERCVERS)) : $(SUFHB)/$(XERCESCLIB) ; 
     6303                DEPENDS $(SUFHB)/$(<:S=.$(SLSFX).$(XERCVERS)) : $(XERCESCHBLIB) ; 
    62916304                DEPENDS $(SUFHB)/$(<) : $(SUFHB)/$(<:S=.$(SLSFX).$(XERCVERS)) ; 
    62926305                DEPENDS shlibs : $(SUFHB)/$(<) ; 
    62936306                LOCATE on $(SUFHB)/$(<) = $(INGLIB) ; 
    62946307                LOCATE on $(SUFHB)/$(<:S=.$(SLSFX).$(XERCVERS)) = $(INGLIB) ; 
    6295                 SEARCH on $(SUFHB)/$(XERCESCLIB) = $(XERCESLOC) ; 
     6308                SEARCH on $(XERCESCHBLIB) = $(XERCESHBLOC) ; 
    62966309 
    62976310                MODE on $(INGLIB)/$(SUFHB)/$(XERCESCLIB) = $(EXEMODE) ;  
  • main/src/tools/port/jam/bldenv

    r9 r22  
    123123##        kerberos in system locations and if they're not found suggest 
    124124##        how they good be if package management is available. 
    125  
     125##      21-Apr-2008 (hanje04) 
     126##          Add auto detect suport for yum (Fedora) 
    126127## 
    127128 
     
    135136deb=false 
    136137conary=false 
     138yum=false 
     139rhybrid=false 
    137140unames=`uname -s` 
    138141unamer=`uname -r` 
     
    206209                xcc_need=i686-unknown-linux-gnu 
    207210                xcc_name=${xcc_need}-gcc 
     211                rhybrid=true 
    208212                ;; 
    209213        x86_64) 
    210214                config_string=a64_lnx 
     215                rhybrid=true 
    211216                ;; 
    212217        ppc64) 
     
    234239            gtk_need=false 
    235240            deb=true 
     241        elif [ -x /usr/bin/yum ] ; then 
     242            export OSVER=FEDORA 
     243            yum=true 
    236244        fi 
    237245 
    238246        # Default to rpm if it's there 
    239         if ! $conary && ! $deb && [ -x /bin/rpm -o -x /usr/bin/rpm ] ; then 
     247        if ! $conary && ! $deb && ! $yum && \ 
     248            [ -x /bin/rpm -o -x /usr/bin/rpm ] ; then 
    240249            rpm=true 
    241250        fi 
     
    345354    elif $deb ; then 
    346355        instcmd="apt-get install libkrb5-dev" 
     356    elif $yum ; then 
     357        instcmd="yum install krb5-devel" 
    347358    else 
    348359        instcmd='' 
     
    385396    XERCESCROOT=/usr 
    386397fi 
    387 if [ -f /usr/lib/libxerces-c.so.27.0 ] ; then 
    388     XERCLOC=/usr/lib 
     398if $rhybrid ; then 
     399    if [ -f /usr/lib64/libxerces-c.so.27.0 ] ; then 
     400        XERCESLOCHB=/usr/lib 
     401        XERCESLOC=/usr/lib64 
     402    fi 
     403else 
     404    if [ -f /usr/lib/libxerces-c.so.27.0 ] ; then 
     405        XERCESLOC=/usr/lib 
     406    fi 
     407    if [ -f /usr/lib64/libxerces-c.so.27.0 ] ; then 
     408        XERCESLOCHB=/usr/lib64 
     409    fi 
    389410fi 
    390411[ "$XERCESCROOT" ] && [ -d ${XERCESCROOT}/src/xercesc -o \ 
     
    394415        export XERCESCROOT=${ING_ROOT}/xerces-c-src_2_7_0 
    395416    else 
    396         unset XERCESCROOT XERCLOC 
     417        unset XERCESCROOT XERCESLOC XERCESLOC64 
    397418        cat << EOF 
    398419 
     
    404425    elif $deb ; then 
    405426        instcmd="apt-get install libxerces27 libxerces27-dev" 
     427    elif $yum ; then 
     428        instcmd="yum install xerces-c xerces-c-devel" 
    406429    else 
    407430        instcmd="" 
     
    438461} 
    439462 
    440 [ -d ${XERCESCROOT}/lib ] &&
     463[ -d ${XERCESCROOT}/lib ] && [ x"$XERCESLOC" = "x" ] &&
    441464        XERCESLOC=${XERCESCROOT}/lib 
    442465while [ -z "$XERCESLOC" ] ; do 
     
    455478    break 
    456479done 
    457 export XERCESCROOT XERCESLOC 
     480export XERCESCROOT XERCESLOC XERCESLOCHB 
    458481 
    459482# pax for Linux 
     
    476499        elif $deb ; then 
    477500            instcmd="apt-get install pax" 
     501        elif $yum ; then 
     502            instcmd="yum install pax" 
    478503        else 
    479504            instcmd="" 
  • main/src/tools/port/shell_unix/shlibinfo.sh

    r1 r22  
    330330#           SIR 119978 
    331331#           Fix up shlink_opts for older OS X releases 
     332#       21-Apr-2008 (hanje04) 
     333#           Remove libgcc_s fromm 32bit link line for x86_64 Linux. 
     334#           It's not needed and causes problems because of a linker bug 
    332335# 
    333336 
     
    625628        shlinkHB_cmd="ld -melf_i386 -shared " 
    626629        shlink_opts=" -lm -lc -lpthread -ldl -lcrypt " 
    627         shlinkHB_opts=" -lm -lc -lpthread -ldl -lcrypt -lgcc_s
     630        shlinkHB_opts=" -lm -lc -lpthread -ldl -lcrypt
    628631        krblink_cmd="ld -shared" 
    629632        krblinkHB_cmd="ld -melf_i386 -shared"