Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update pom.xml for FreeBSD support #475

Closed
wants to merge 1 commit into from
Closed
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
Update pom.xml for FreeBSD suppost
Update pom.xml for FreeBSD suppost, tested with java 11 and java 17
  • Loading branch information
achix authored Nov 29, 2023
commit 615b2586b568a93d072167136cab66d38ba48ffc
41 changes: 41 additions & 0 deletions pljava-so/pom.xml
Original file line number Diff line number Diff line change
@@ -120,6 +120,47 @@
}
},

{
name : "FreeBSD",

object_extension : ".o",

probe: function(os_name) {
return os_name.toLowerCase().contains("freebsd");
},

compile : function(cc, files, output_dir, includes, defines, flags) {
includes.add(java_include.resolve("freebsd").toString());
defines.put("FreeBSD", null);
flags.add("-c");
if(isDebugEnabled)
flags.add("-g");
var compileProcess = utils.processBuilder(function(l) {
l.add(cc);
l.addAll(pgxs.formatDefines(defines));
l.addAll(pgxs.formatIncludes(includes));
l.addAll(flags);
l.addAll(files);
});
compileProcess.directory(output_dir.toFile());
return runCommand(compileProcess);
},

link : function(cc, flags, files, target_path) {
if(isDebugEnabled)
flags.add("-g");
flags.add("-shared-libgcc");
var linkingProcess = utils.processBuilder(function(l) {
l.add(cc);
l.addAll(flags);
l.addAll(of("-shared", "-o", "lib" + library_name + ".so"));
l.addAll(files);
});
linkingProcess.directory(target_path.toFile());
return runCommand(linkingProcess);
}
},

{
name : "Mac OS X",