Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ include_directories(src/giac/headers)

add_definitions(-DHAVE_NO_HOME_DIRECTORY -DGIAC_GGB -DIN_GIAC -DHAVE_LIB_PTHREAD
-DGIAC_GENERIC_CONSTANTS -DTIMEOUT
-DHAVE_LIBMPFR -DVERSION="1.2.3") # Version number seems hardwired, FIXME.
-DHAVE_LIBMPFR -DVERSION="1.9.0") # Version number seems hardwired, FIXME.

add_executable(minigiac
${GIAC_SOURCES}
Expand Down
20 changes: 7 additions & 13 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -64,20 +64,13 @@ def emgiacSourceDir = "$externalSourceDir/emgiac"

def jsPrebuiltDir = "src/giac.js/prebuilt"
def LlvmMpfrA = "$jsPrebuiltDir/libmpfr.a"
def LlvmMpfiA = "$jsPrebuiltDir/libmpfi.a"
def LlvmGmpA = "$jsPrebuiltDir/libgmp.a"
if (System.env['EXT_GMPMPFR'] != null && System.env['EXT_GMPMPFR'] == "local") {
LlvmMpfrA = "$mpfrSourceDir/src/.libs/libmpfr.a"
LlvmGmpA = "$gmpSourceDir/.libs/libgmp.a"
}
if (System.env['EXT_GMPMPFR'] != null && System.env['EXT_GMPMPFR'] == "emgiac") {
LlvmMpfrA = "$emgiacSourceDir/giac/libmpfr.a"
LlvmGmpA = "$emgiacSourceDir/giac/libgmp.a"
}

def emsdkDir = file('emsdk')
def emsdkRunDir = file("$emsdkDir")

def emscriptenVersion = 'tag-3.1.18'
def emscriptenVersion = 'tag-3.1.41'
if (System.env['EMSCRIPTEN_VERSION'] != null) {
emscriptenVersion = System.env['EMSCRIPTEN_VERSION']
}
Expand All @@ -88,7 +81,7 @@ def emccCommand = "${emscriptenDir}/emcc"
// End of emscripten related settings. Huh.
def java_home = org.gradle.internal.jvm.Jvm.current().javaHome
ext.ggrev = project.findProperty("revision") ?: "SNAPSHOT"
def giacVersion = '"1.2.4-' + ggrev + '"'
def giacVersion = '"1.9.0-' + ggrev + '"'
println giacVersion
import org.apache.tools.ant.taskdefs.condition.Os
def isMac = Os.isFamily(Os.FAMILY_MAC)
Expand Down Expand Up @@ -934,12 +927,12 @@ tasks.addRule("Pattern: emccCompileWasm_<FILE>Cc: Compile <FILE>.cc into <FILE>.
def commandline = emccCommand
commandline += ' -DIN_GIAC -DGIAC_GENERIC_CONSTANTS -DHAVE_CONFIG_H -DNO_STDEXCEPT -fno-exceptions' // from old Makefile
commandline += ' -DVERSION=' + giacVersion
commandline += " -Dgammaf=tgammaf -s ALLOW_MEMORY_GROWTH=1"
commandline += " -Dgammaf=tgammaf -s ALLOW_MEMORY_GROWTH=1 -std=gnu++14"
commandline += " -s WASM=1 -s NO_EXIT_RUNTIME=1"
commandline += " -s PRECISE_I64_MATH=1 -Oz" // new setting
commandline += " -DHAVE_UNISTD_H"
commandline += ' -DGIAC_GGB' // from old Makefile
commandline += ' -DTIMEOUT -DEMCC2 ' // from old config.h
commandline += ' -DTIMEOUT -DEMCC2 -DHAVE_LIBMPFI' // from old config.h
commandline += " -Isrc/giac/headers -c $input -o $output"
println "Compiling: ${commandline}"
commandLine commandline.split()
Expand Down Expand Up @@ -988,11 +981,12 @@ task emccGiacJsWasm(dependsOn: 'emccCompileWasm') {

file(binaryJsDir).mkdirs()
exec {
linkerArgs << LlvmMpfiA
linkerArgs << LlvmMpfrA // mpfr must precede gmp, see http://www.mpfr.org/faq.html, Q5
linkerArgs << LlvmGmpA
linkerArgs << '--js-library' << 'src/giac.js/js/time.js'

linkerArgs << '-DGIAC_GGB'
linkerArgs << '-DGIAC_GGB' << "-std=gnu++14"
linkerArgs << '-o' << output
// linkerArgs << "-s" << "DISABLE_EXCEPTION_CATCHING=0"
linkerArgs << '-Oz' << '-v' << '-s' << "EXPORTED_FUNCTIONS=['_caseval']"
Expand Down
2 changes: 1 addition & 1 deletion giac-gwt/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ plugins {
apply from: '../repositories.gradle'

dependencies {
api 'org.gwtproject:gwt-dev:2.10.0',
api 'org.gwtproject:gwt-dev:2.11.0',
'org.gwtproject.resources:gwt-resources-api:HEAD-SNAPSHOT'
annotationProcessor 'org.gwtproject.resources:gwt-resources-processor:HEAD-SNAPSHOT'
}
Expand Down
Binary file added src/giac.js/prebuilt/libmpfi.a
Binary file not shown.
6 changes: 3 additions & 3 deletions src/giac/headers/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,20 @@

/* Define to the full name and version of this package. */
#ifndef PACKAGE_STRING
#define PACKAGE_STRING "giac 1.2.3"
#define PACKAGE_STRING "giac 1.9.0"
#endif

/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "giac"

/* Define to the version of this package. */
#ifndef PACKAGE_VERSION
#define PACKAGE_VERSION "1.2.3"
#define PACKAGE_VERSION "1.9.0"
#endif

/* Version number of package */
#ifndef VERSION
#define VERSION "1.2.3"
#define VERSION "1.9.0"
#endif

#define GIAC_NO_OPTIMIZATIONS
Expand Down
Loading