Hi Eric. There is no use for a diff of the above change.
GNU Cobol 2.0 will have this change, together with other clang specific changes.
OpenCOBOL 2.0 is a dev-in-progress version and should not be packaged (if you want a dev version: build it on your own and if you do so: use most current version --> GNU Cobol 2.x)
both OpenCOBOL 1.1 and GNU Cobol 1.1 doesn't have the option which is patched, you'll need a patch for cobc/codegen.c and tweak the configure line.
Both changes be found at [patches:#10]. You may want to patch generated defaults.h (via sed!), too (if -R is used it must be prefixed with "-Wl," - this is the problem of the topic starter).
Please add the option for make check to the Portfile.
GNU Cobol 2.0 will check if clang is used during configure and will add -std=gnu89 in this case on its own. There is no need to set/export CC/CXX if clang is used behind a gcc called binary, it just makes this more obvious.
If you can check for clang on your within the Portfile via something like
::c
int
main ()
{
#if defined(__GNUC__) && !defined(__clang__)
return 0;
#else
return 1;
#endif
}
(see gnu-cobol-2.0/configure around line 13155; check for INTEL compiler) it would be good to apply the patch and change the options for configure dynamically.
If not it may could be a good solution to have two Portfiles:
gnu-cobol-gcc (maybe the patch of default.h via sed but nothing else)
gnu-cobol-clang (full patches applied)
Hi Eric. There is no use for a diff of the above change.
Both changes be found at [patches:#10]. You may want to patch generated defaults.h (via sed!), too (if -R is used it must be prefixed with "-Wl," - this is the problem of the topic starter).
Please add the option for make check to the Portfile.
GNU Cobol 2.0 will check if clang is used during configure and will add -std=gnu89 in this case on its own. There is no need to set/export CC/CXX if clang is used behind a gcc called binary, it just makes this more obvious.
If you can check for clang on your within the Portfile via something like
(see gnu-cobol-2.0/configure around line 13155; check for INTEL compiler) it would be good to apply the patch and change the options for configure dynamically.
If not it may could be a good solution to have two Portfiles:
gnu-cobol-gcc (maybe the patch of default.h via sed but nothing else)
gnu-cobol-clang (full patches applied)
Simon
Related
Patches: #10
Last edit: Simon Sobisch 2014-06-10