Changeset 27fc50 in git


Ignore:
Timestamp:
Apr 25, 2011, 8:25:05 AM (13 years ago)
Author:
Oleksandr Motsak <motsak@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', '3720ae8bfcff4a4649ee98a15552089151d2d59b')
Children:
a450864c27b9804e7ff6a533512615d3386bbff7
Parents:
3ebb22ee86653ce026fa2cff30316e8ec3230c4d
Message:
FIX: fixed building/loading of dynamic modules on Mac OS X

From: Oleksandr Motsak <motsak@mathematik.uni-kl.de>

git-svn-id: file:///usr/local/Singular/svn/trunk@14179 2c84dea3-7e68-4137-9b89-c4e89433aadc
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • dyn_modules/bigintm/SConstruct

    r3ebb22e r27fc50  
    11# Emacs edit mode for this file is -*- python -*-
     2
     3from SCons.Defaults import SharedCheck, ProgScan
     4from SCons.Script.SConscript import SConsEnvironment
    25
    36MODNAME = 'bigintm'
     
    1720CXXTEMPLFLAGS = "-fno-implicit-templates --no-exceptions"
    1821
    19 
    20 
     22BUNDLETEMPFLAGS = '$LDMODULEFLAGS -twolevel_namespace -weak_reference_mismatches weak -undefined dynamic_lookup'
    2123
    2224### for the use with "scons debug=1"
     
    3032        CPPPATH = SING_INCLUDES,
    3133        CXXFLAGS = "-g -Wextra -Wall -pedantic -Wno-long-long " + CXXTEMPLFLAGS,
     34        LDMODULEFLAGS = BUNDLETEMPFLAGS,
    3235        LIBS=[])
    3336    Default(syzextra_debug_if)
    3437else:
    3538    ### Works with any Singular
    36     syzextra_if = env.SharedLibrary(MODNAME,
     39    syzextra_if = env.LoadableModule(MODNAME,
    3740        SRCS,
    3841        SHLIBPREFIX="",
     
    4346        CXXFLAGS = "-O3 -fomit-frame-pointer --no-rtti " + CXXTEMPLFLAGS,
    4447        CCFLAGS="-O3 -fomit-frame-pointer ",
     48        LDMODULEFLAGS = BUNDLETEMPFLAGS,
    4549        LIBS=[])
    4650    Default(syzextra_if)
  • dyn_modules/bigintm/bigintm.cc

    r3ebb22e r27fc50  
    292292#endif
    293293
    294 };
     294}
    295295
    296296// this is only a demo
  • dyn_modules/syzextra/SConstruct

    r3ebb22e r27fc50  
    11# Emacs edit mode for this file is -*- python -*-
     2
     3from SCons.Defaults import SharedCheck, ProgScan
     4from SCons.Script.SConscript import SConsEnvironment
    25
    36MODNAME = 'syzextra'
     
    1720CXXTEMPLFLAGS = "-fno-implicit-templates --no-exceptions"
    1821
    19 
    20 
     22## BUNDLETEMPFLAGS = '$LDMODULEFLAGS -flat_namespace -undefined suppress'
     23BUNDLETEMPFLAGS = '$LDMODULEFLAGS -twolevel_namespace -weak_reference_mismatches weak -undefined dynamic_lookup'
    2124
    2225### for the use with "scons debug=1"
     
    3033        CPPPATH = SING_INCLUDES,
    3134        CXXFLAGS = "-g -Wextra -Wall -pedantic -Wno-long-long " + CXXTEMPLFLAGS,
     35        LDMODULEFLAGS = BUNDLETEMPFLAGS,
    3236        LIBS=[])
    3337    Default(syzextra_debug_if)
    3438else:
    3539    ### Works with any Singular
    36     syzextra_if = env.SharedLibrary(MODNAME,
     40    syzextra_if = env.LoadableModule(MODNAME,
    3741        SRCS,
    3842        SHLIBPREFIX="",
     
    4347        CXXFLAGS = "-O3 -fomit-frame-pointer --no-rtti " + CXXTEMPLFLAGS,
    4448        CCFLAGS="-O3 -fomit-frame-pointer ",
     49        LDMODULEFLAGS = BUNDLETEMPFLAGS,
    4550        LIBS=[])
    4651    Default(syzextra_if)
  • kernel/Makefile.in

    r3ebb22e r27fc50  
    376376##
    377377
    378 p_Procs_%.sog: p_Procs_Lib_%.dl_og 
    379         ${CXXG} ${CXXFLAGSG} ${SFLAGS} ${SLDFLAGS} $< -o $@
     378p_Procs_%.sog: p_Procs_Lib_%.dl_og
     379        $(LD) ${SLDFLAGS} -o $@ $^
    380380
    381381p_Procs_Lib_%.dl_og : p_Procs_Lib.cc  p_Procs_Dynamic.og
  • kernel/gring.h

    r3ebb22e r27fc50  
    134134{
    135135  return r->GetNC();
    136 };
     136}
    137137
    138138inline nc_type& ncRingType(nc_struct* p)
     
    140140  assume(p!=NULL);
    141141  return (p->ncRingType());
    142 };
     142}
    143143
    144144inline nc_type ncRingType(ring r) // Get
     
    148148  else
    149149    return (nc_error);
    150 };
     150}
    151151
    152152inline void ncRingType(ring r, nc_type t) // Set
     
    154154  assume((r != NULL) && (r->GetNC() != NULL));
    155155  ncRingType(r->GetNC()) = t;
    156 };
    157 
     156}
    158157
    159158inline void ncRingType(nc_struct* p, nc_type t) // Set
     
    161160  assume(p!=NULL);
    162161  ncRingType(p) = t;
    163 };
    164 
    165 
    166 
     162}
    167163
    168164
     
    260256
    261257
    262 // inline const nc_struct* GetNC() const { return GetBasering()->GetNC(); };
     258// inline const nc_struct* GetNC() const { return GetBasering()->GetNC(); }
    263259
    264260
     
    273269  assume( (i > 0) && (i < j) && (j <= ncols) );
    274270  return ( C->m[ncols * ((i)-1) + (j)-1] );
    275 };
     271}
    276272
    277273// get D_{i,j}, 1 <= row = i < j = col <= N
     
    284280  assume( (i > 0) && (i < j) && (j <= ncols) );
    285281  return ( D->m[ncols * ((i)-1) + (j)-1] );
    286 };
     282}
    287283
    288284
  • kernel/ideals.h

    r3ebb22e r27fc50  
    7878  while ((j >= 0) && (mm[j] == NULL)) j--;
    7979  return (j + 1);
    80 };
     80}
    8181
    8282void idNorm(ideal id);
  • kernel/kutil.h

    r3ebb22e r27fc50  
    368368void cleanT (kStrategy strat);
    369369static inline LSet initL (int nr=setmaxL)
    370 { return (LSet)omAlloc(nr*sizeof(LObject)); };
     370{ return (LSet)omAlloc(nr*sizeof(LObject)); }
    371371void deleteInL(LSet set, int *length, int j,kStrategy strat);
    372372void enterL (LSet *set,int *length, int *LSetmax, LObject p,int at);
  • kernel/mod_raw.cc

    r3ebb22e r27fc50  
    3333{
    3434  const char mach_o[]={0xfe,0xed,0xfa,0xce,0};
     35  const char mach_o_module[]={0xce,0xfa,0xed,0xfe,0};
    3536  char        buf[BYTES_TO_CHECK+1];        /* one extra for terminating '\0' */
    3637  struct stat sb;
     
    7677    goto lib_type_end;
    7778  }
     79
     80  if( (strncmp(buf, &mach_o_module[0], 4)==0)) /* Mach-O bundle */
     81  {
     82    LT = LT_MACH_O;
     83    //omFree(newlib);
     84    //newlib = omStrDup(libnamebuf);
     85    goto lib_type_end;
     86  }
     87
     88   
    7889  if( (strncmp(buf, "\02\020\01\016\05\022@", 7)==0))
    7990  {
  • kernel/sca.h

    r3ebb22e r27fc50  
    4040
    4141  return (r->GetNC()->FirstAltVar());
    42 };
     42}
    4343
    4444inline unsigned int scaLastAltVar(ring r)
     
    4747
    4848  return (r->GetNC()->LastAltVar());
    49 };
     49}
    5050
    5151
     
    5656
    5757  r->GetNC()->FirstAltVar() = n;
    58 };
     58}
    5959
    6060inline void scaLastAltVar(ring r, int n)
     
    6363
    6464  r->GetNC()->LastAltVar() = n;
    65 };
     65}
    6666
    6767
Note: See TracChangeset for help on using the changeset viewer.