<html lang='en'>
<head>
<meta content='text/html; charset=utf-8' http-equiv='Content-Type'>
<title>
GitLab
</title>
</meta>
</head>
<style>
  img {
    max-width: 100%;
    height: auto;
  }
  p.details {
    font-style:italic;
    color:#777
  }
  .footer p {
    font-size:small;
    color:#777
  }
  pre.commit-message {
    white-space: pre-wrap;
  }
  .file-stats a {
    text-decoration: none;
  }
  .file-stats .new-file {
    color: #090;
  }
  .file-stats .deleted-file {
    color: #B00;
  }
</style>
<body>
<div class='content'>
<h3>
Amar Takhar pushed to branch master
at <a href="https://gitlab.com/NTPsec/ntpsec">NTPsec / ntpsec</a>
</h3>
<h4>
Commits:
</h4>
<ul>
<li>
<strong><a href="https://gitlab.com/NTPsec/ntpsec/commit/17978bab9925f6e0f394e60c2de5118077c8783d">17978bab</a></strong>
<div>
<span>by Amar Takhar</span>
<i>at 2016-01-15T23:01:40-05:00</i>
</div>
<pre class='commit-message'>No need to make a bin for the cross sizeof check.

This speeds up configure.</pre>
</li>
<li>
<strong><a href="https://gitlab.com/NTPsec/ntpsec/commit/75a950e7c44fb9187c8b87e8c85a277b340d42e4">75a950e7</a></strong>
<div>
<span>by Amar Takhar</span>
<i>at 2016-01-15T23:01:40-05:00</i>
</div>
<pre class='commit-message'>Push more settings into the host as required.

  * Also rename cross compile options and give them their own options group.
  * libpthread has been made optional.  This needs fixing in the future.</pre>
</li>
<li>
<strong><a href="https://gitlab.com/NTPsec/ntpsec/commit/68d93437734637d04a5c2339f980161009d0347e">68d93437</a></strong>
<div>
<span>by Amar Takhar</span>
<i>at 2016-01-15T23:01:40-05:00</i>
</div>
<pre class='commit-message'>Fix 'waf check' and add variant subcommands.</pre>
</li>
</ul>
<h4>3 changed files:</h4>
<ul>
<li class='file-stats'>
<a href='#diff-0'>
pylib/check_sizeof.py
</a>
</li>
<li class='file-stats'>
<a href='#diff-1'>
pylib/configure.py
</a>
</li>
<li class='file-stats'>
<a href='#diff-2'>
wscript
</a>
</li>
</ul>
<h4>Changes:</h4>
<li id='diff-0'>
<a href='https://gitlab.com/NTPsec/ntpsec/compare/5c551aa16d53f2cb6a6cab8c25df3dced7c3ca51...68d93437734637d04a5c2339f980161009d0347e#diff-0'>
<strong>
pylib/check_sizeof.py
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: #ffdddd">--- a/pylib/check_sizeof.py
</span><span style="color: #000000;background-color: #ddffdd">+++ b/pylib/check_sizeof.py
</span><span style="color: #aaaaaa">@@ -61,6 +61,7 @@ def check_sizeof_cross(ctx, header, sizeof, mandatory=True):
</span>           try:
                        ctx.check_cc(
                                fragment        = SIZE_FRAG_CROSS % (header_snippet, sizeof, size),
<span style="color: #000000;background-color: #ddffdd">+                                features        = "c",
</span>                           execute     = False,
                                mandatory       = mandatory,
                        )
</code></pre>

<br>
</li>
<li id='diff-1'>
<a href='https://gitlab.com/NTPsec/ntpsec/compare/5c551aa16d53f2cb6a6cab8c25df3dced7c3ca51...68d93437734637d04a5c2339f980161009d0347e#diff-1'>
<strong>
pylib/configure.py
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: #ffdddd">--- a/pylib/configure.py
</span><span style="color: #000000;background-color: #ddffdd">+++ b/pylib/configure.py
</span><span style="color: #aaaaaa">@@ -8,19 +8,53 @@ def cmd_configure(ctx):
</span>   srcnode = ctx.srcnode.abspath()
        bldnode = ctx.bldnode.abspath()
 
<span style="color: #000000;background-color: #ddffdd">+        opt_map = {}
+       # Wipe out and override flags with those from the commandline
+       for flag in ctx.env.OPT_STORE:
+               opt = flag.replace("--", "").upper() # XXX: find a better way.
+               opt_map[opt] = ctx.env.OPT_STORE[flag]
+
+
+       msg("--- Configuring host ---")
+       ctx.setenv('host', ctx.env.derive())
+
</span>   ctx.load('compiler_c')
        ctx.load('bison')
 
<span style="color: #000000;background-color: #ffdddd">-        if ctx.options.enable_cross:
-               ctx.env.ENABLE_CROSS = True
</span><span style="color: #000000;background-color: #ddffdd">+   for opt in opt_map:
+               ctx.env[opt] = opt_map[opt]
</span> 
        from compiler import check_compiler
        check_compiler(ctx)
 
<span style="color: #000000;background-color: #ddffdd">+
+
+       msg("--- Configuring main ---")
+       ctx.setenv("main", ctx.env.derive())
+
</span>   from check_type import check_type
        from check_sizeof import check_sizeof
        from check_structfield import check_structfield
 
<span style="color: #000000;background-color: #ddffdd">+        for opt in opt_map:
+               ctx.env[opt] = opt_map[opt]
+
+       if ctx.options.cross_compiler:
+               ctx.env.ENABLE_CROSS = True
+
+               ctx.start_msg("Using Cross compiler CC:")
+#              ctx.get_cc_version(ctx.env.CC, gcc=True)
+               ctx.end_msg(ctx.options.cross_compiler)
+
+               ctx.env.CC = ctx.options.cross_compiler
+               ctx.env.LINK_CC = ctx.options.cross_compiler
+
+               if ctx.env["CROSS-CFLAGS"]:
+                       ctx.env.CFLAGS = opt_map["CROSS-CFLAGS"]
+
+               if ctx.env["CROSS-LDFLAGS"]:
+                       ctx.env.LDFLAGS = opt_map["CROSS-LDFLAGS"]
+
</span> 
        if ctx.options.list:
                from refclock import refclock_map
<span style="color: #aaaaaa">@@ -32,6 +66,7 @@ def cmd_configure(ctx):
</span>           return
 
 
<span style="color: #000000;background-color: #ddffdd">+
</span>   # This needs to be at the top since it modifies CC and AR
        if ctx.options.enable_fortify:
                from check_fortify import check_fortify
<span style="color: #aaaaaa">@@ -80,11 +115,6 @@ def cmd_configure(ctx):
</span>   if ctx.env.PLATFORM_TARGET == "osx":
                ctx.define("__APPLE_USE_RFC_3542", 1)
 
<span style="color: #000000;background-color: #ffdddd">-        # Wipe out and override flags with those from the commandline
-       for flag in ctx.env.OPT_STORE:
-               opt = flag.replace("--", "").upper() # XXX: find a better way.
-               ctx.env[opt] = ctx.env.OPT_STORE[flag]
-
</span>   if ctx.options.enable_rtems_trace:
                ctx.find_program("rtems-tld", var="BIN_RTEMS_TLD", path_list=[ctx.options.rtems_trace_path, ctx.env.BINDIR])
                ctx.env.RTEMS_TEST_ENABLE = True
<span style="color: #aaaaaa">@@ -215,7 +245,7 @@ def cmd_configure(ctx):
</span>   ctx.check_cc(lib="edit", mandatory=False)
        ctx.check_cc(lib="m")
        ctx.check_cc(lib="ossaudio", mandatory=False)  # NetBSD audio
<span style="color: #000000;background-color: #ffdddd">-        ctx.check_cc(lib="pthread")
</span><span style="color: #000000;background-color: #ddffdd">+   ctx.check_cc(lib="pthread", mandatory=False)
</span>   ctx.check_cc(lib="rt", mandatory=False)
        ctx.check_cc(lib="readline", mandatory=False)
        ctx.check_cc(lib="thr", mandatory=False)
</code></pre>

<br>
</li>
<li id='diff-2'>
<a href='https://gitlab.com/NTPsec/ntpsec/compare/5c551aa16d53f2cb6a6cab8c25df3dced7c3ca51...68d93437734637d04a5c2339f980161009d0347e#diff-2'>
<strong>
wscript
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: #ffdddd">--- a/wscript
</span><span style="color: #000000;background-color: #ddffdd">+++ b/wscript
</span><span style="color: #aaaaaa">@@ -51,8 +51,11 @@ def options(ctx):
</span>   grp.add_option('--disable-dns-lookup', action='store_true', default=False, help="Disable DNS lookups.")
        grp.add_option('--disable-dns-retry', action='store_true', default=False, help="Disable retrying DNS lookups.")
        grp.add_option('--disable-mdns-registration', action='store_true', default=False, help="Disable MDNS registration.")
<span style="color: #000000;background-color: #ffdddd">-        grp.add_option('--enable-cross', action='store_true', default=False, help="Cross compile.")
</span> 
<span style="color: #000000;background-color: #ddffdd">+        grp = ctx.add_option_group("NTP cross compile options")
+       grp.add_option('--cross-compiler', type='string', help="Path to cross compiler CC. (enables cross-compiling)")
+       grp.add_option('--cross-cflags', type='string',  action="callback", callback=callback_flags, help="Cross compiler CFLAGS.")
+       grp.add_option('--cross-ldflags', type='string', action="callback", callback=callback_flags, help="Cross compiler LDFLAGS.")
</span> 
        grp = ctx.add_option_group("NTP configure features")
        grp.add_option('--enable-leap-smear', action='store_true', default=False, help="Enable Leap Smearing.")
<span style="color: #aaaaaa">@@ -104,7 +107,7 @@ def configure(ctx):
</span> from waflib.Build import BuildContext
 class check(BuildContext):
        cmd = 'check'
<span style="color: #000000;background-color: #ffdddd">-
</span><span style="color: #000000;background-color: #ddffdd">+   variant = "main"
</span> 
 # Borrowed from https://www.rtems.org/
 variant_cmd = (
<span style="color: #aaaaaa">@@ -113,9 +116,17 @@ variant_cmd = (
</span>   ("install", InstallContext),
        ("step",    StepContext),
        ("list",    ListContext),
<span style="color: #000000;background-color: #ffdddd">-        ("check",   BuildContext)
</span><span style="color: #000000;background-color: #ddffdd">+#  ("check",   BuildContext)
</span> )
 
<span style="color: #000000;background-color: #ddffdd">+for v in ["host", "main"]:
+    # the reason for creating these subclasses is just for __doc__ below...
+       for cmd, cls in variant_cmd:
+               class tmp(cls):
+                       __doc__ = "%s %s" % (cmd, v)
+                       cmd = "%s_%s" % (cmd, v)
+                       variant = v
+
</span> def init_handler(ctx):
        cmd = ctx.cmd
        if cmd == 'init_handler':
</code></pre>

<br>
</li>

</div>
<div class='footer' style='margin-top: 10px;'>
<p>

<br>
<a href="https://gitlab.com/NTPsec/ntpsec/compare/5c551aa16d53f2cb6a6cab8c25df3dced7c3ca51...68d93437734637d04a5c2339f980161009d0347e">View it on GitLab</a>.
<br>
You're receiving this email because of your account on gitlab.com.
If you'd like to receive fewer emails, you can adjust your notification settings.

</p>
</div>
</body>
</html>