coutflag => "-o",
cpp_depend_flags => "-Hp",
LD => "ilink32",
- LDFLAGS => picker(default => "-ap -x -Gn -q",
+ LDFLAGS => picker(default => "-x -Gn -q -w-dup",
debug => '-j"$(BDS)\lib\win32c\debug" ' .
'-L"$(BDS)\lib\win32c\debug" -v',
release => '-j"$(BDS)\lib\win32c\release" ' .
'-L"$(BDS)\lib\win32c\release"'),
- bin_lflags => "-Tpe c0x32.obj wildargs.obj",
+ bin_lflags => "-ap -Tpe c0x32.obj wildargs.obj",
ldoutflag => ",",
ldpostoutflag => ",,",
ld_resp_delim => " +\n",
RCFLAGS => '-i"$(BDS)\include\windows\sdk"',
rcoutflag => "-fo",
shared_target => "win-shared",
- shared_ldflag => "-Tpd c0d32.obj",
- dso_lflags => "-Tpd c0d32.obj",
+ shared_ldflag => "-aa -Tpd c0d32.obj",
lddefflag => ",",
ldresflag => ",",
- ld_implib_rule => 'implib $< $**',
+ ld_implib_rule => 'implib -a $< $**',
dso_scheme => "win32",
+ shared_defflag => '',
+ perl_platform => 'Windows::cppbuilder',
}
);
--- /dev/null
+package platform::Windows::cppbuilder;
+
+use vars qw(@ISA);
+
+require platform::Windows::MSVC;
+@ISA = qw(platform::Windows::MSVC);
+
+sub pdbext { '.tds' }
+
+# C++Builder's Clang-based compilers prepend an underscore to __cdecl-convention
+# C functions, and the linker needs those as the InternalName in the .def file.
+sub export2internal {
+ return "_$_[1]";
+}
+
+1;
$dll: $deps
IF EXIST $full.manifest DEL /F /Q $full.manifest
IF EXIST \$@ DEL /F /Q \$@
- \$(LD) \$(LDFLAGS) \$(LIB_LDFLAGS) @<< $implib_flag || (DEL /Q \$(\@B).* $import; EXIT 1)
+ cmd /C "\$(LD) \$(LDFLAGS) \$(LIB_LDFLAGS) @<< $implib_flag || (DEL /Q \$(\@B).* $import & EXIT 1)"
$objs$target{ld_resp_delim}\$(LDOUTFLAG)$dll$target{ldpostoutflag}$target{ld_resp_delim}$linklibs\$(LIB_EX_LIBS)$target{ld_resp_delim}$shared_def$target{ldresflag}$ress
<<
IF EXIST $dll.manifest \\
return <<"EOF";
$dso: $deps
IF EXIST $dso.manifest DEL /F /Q $dso.manifest
- \$(LD) \$(LDFLAGS) \$(DSO_LDFLAGS) @<< || (DEL /Q \$(\@B).* $dso_n.*; EXIT 1)
+ cmd /C "\$(LD) \$(LDFLAGS) \$(DSO_LDFLAGS) @<< || (DEL /Q \$(\@B).* $dso_n.* & EXIT 1)"
$objs$target{ld_resp_delim}\$(LDOUTFLAG)$dso$target{ldpostoutflag}$target{ld_resp_delim}$linklibs \$(DSO_EX_LIBS)$target{ld_resp_delim}$shared_def$target{ldresflag}$ress
<<
IF EXIST $dso.manifest \\
; Definition file for the DLL version of the $libname library from OpenSSL
;
-LIBRARY $libname
+LIBRARY "$libname"
EXPORTS
_____
for (@_) {
- print " ",$_->name(),"\n";
+ print " ",$_->name();
+ if (platform->can('export2internal')) {
+ print "=". platform->export2internal($_->name());
+ }
+ print "\n";
}
}