Euphoria
Ticket #532:
Add -additional-cflags and -additional-lflags to euc
-
Reported by
jeremy
Dec 10, 2010
Or something along those lines. The current -lflags and -cflags overwrite any flags set by euc. The example that broght this up was linking in th gcov library for coverage testing.
Details
1. Comment by ne1uno
Jan 01, 2012
commandline parsing of += and *= for add and add if not already added would be a good solution for cflags, lflagsm warn setting and probably a few other options.
not sure if this is easy or possible.
2. Comment by Jerome
Feb 28, 2013
Thought I would take a stab at this ticket! I added "-extra-cflags" and "-extra-lflags" to euc according to the OP.
# HG changeset patch
# User Ira Hill
# Date 1362064480 18000
# Node ID a9b590964870ace8b98a7e2a2568bd4aeb463c2b
# Parent 6b1178de80f5cd9a19125a32f6e350454d1ca789
Ticket 532: Additional cflags and lflags for euc
diff -r 6b1178de80f5 -r a9b590964870 source/buildsys.e
--- a/source/buildsys.e Wed Feb 27 14:31:20 2013 -0500
+++ b/source/buildsys.e Thu Feb 28 10:14:40 2013 -0500
@@ -176,11 +176,21 @@
export sequence cflags = ""
--**
+-- Optional flags to append to default compiler options
+
+export sequence extra_cflags = ""
+
+--**
-- Optional flags to pass to the linker
export sequence lflags = ""
--**
+-- Optional flags to append to default linker options
+
+export sequence extra_lflags = ""
+
+--**
-- Force the build of even up-to-date source files
export integer force_build = 0
@@ -545,10 +555,18 @@
c_flags = cflags
end if
+ if length(extra_cflags) then
+ c_flags &= " " & extra_cflags
+ end if
+
if length(lflags) then
l_flags = lflags
l_flags_begin = ""
end if
+
+ if length(extra_lflags) then
+ l_flags &= " " & extra_lflags
+ end if
return {
c_exe, c_flags, l_exe, l_flags, obj_ext, exe_ext, l_flags_begin, rc_comp
diff -r 6b1178de80f5 -r a9b590964870 source/msgtext.e
--- a/source/msgtext.e Wed Feb 27 14:31:20 2013 -0500
+++ b/source/msgtext.e Thu Feb 28 10:14:40 2013 -0500
@@ -302,7 +302,7 @@
{273, "Using Managed Memory"},
{274, "Using System Memory"},
{275, "EuConsole"},
- {276, "-deleted-"},
+ {276, "Specify additional compiler flags to translator!"},
{277, "\nPaused: press any key ..."},
{278, "\n(press any key and window will close ...)"},
{279, "Turn on batch processing (do not \"Press Enter\" on error)"},
@@ -343,7 +343,7 @@
{314, "Invalid option: [1]"},
{315, "Internal error; Binding seek to start of IL failed!"},
{316, "Internal error; Binding seek to checksum area failed!"},
- {317, "-deleted-"},
+ {317, "Specify additional linker flags for translator!"},
{318, "Your custom icon file is too large."},
{319, "Verbose output"},
{320, "[1] - module variable '[2]' is assigned but never used"},
diff -r 6b1178de80f5 -r a9b590964870 source/traninit.e
--- a/source/traninit.e Wed Feb 27 14:31:20 2013 -0500
+++ b/source/traninit.e Thu Feb 28 10:14:40 2013 -0500
@@ -98,6 +98,8 @@
{ "no-cygwin", 0, GetMsgText(355,0), { } },
{ "arch", 0, GetMsgText(356), { HAS_PARAMETER, "architecture" } },
{ "cc-prefix", 0, GetMsgText( MSG_CC_PREFIX ), { HAS_PARAMETER, "prefix" } },
+ { "extra-cflags", 0, GetMsgText(276,0), { HAS_PARAMETER, "extra_cflags"} },
+ { "extra-lflags", 0, GetMsgText(317,0), { HAS_PARAMETER, "extra_lflags"} },
$
}
@@ -141,9 +143,15 @@
case "cflags" then
cflags = val
+
+ case "extra-cflags" then
+ extra_cflags = val
case "lflags" then
lflags = val
+
+ case "extra-lflags" then
+ extra_lflags = val
case "wat" then
compiler_type = COMPILER_WATCOM
3. Comment by mattlewis
Feb 28, 2013
See: hg:euphoria/rev/04b85d87d76c
changeset: 6011:04b85d87d76c tag: tip parent: 6009:0b9c4b4d3a32 user: Matt Lewis date: Thu Feb 28 10:38:13 2013 -0500 files: docs/e2c.txt docs/release/4.1.0.txt source/buildsys.e source/msgtext.e source/traninit.e description:
- extra-cflags, extra-lflags
- patch from Ira Hill
- fixes ticket 532
4. Comment by Jerome
Mar 01, 2013
Matt, are there other small ticket items the devs would appreciate help with?
5. Comment by mattlewis
Mar 01, 2013
It's hard to single things out. Of course, bug fixes are generally less controversial than enhancements. But any help is appreciated, especially documentation updates / fixes / enhancements.