all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Sarah Morgensen <iskarian@mgsn.dev>
To: Liliana Marie Prikler <liliana.prikler@gmail.com>
Cc: 50449@debbugs.gnu.org
Subject: [bug#50449] [bug#47006] [WIP PATCH v2 2/2] gnu: Add zig.
Date: Thu, 23 Sep 2021 17:17:28 -0700	[thread overview]
Message-ID: <867df6kesn.fsf@mgsn.dev> (raw)
In-Reply-To: <7b114e500e29364f44b0080e0f782255e92be74f.camel@gmail.com> (Liliana Marie Prikler's message of "Tue, 14 Sep 2021 18:17:14 +0200 (1 week, 2 days, 7 hours ago)")

Hi Liliana,

I just thought I'd send a note that lld (and the LLVM toolchain) is now
12.0.1 in master (see a7283c1d14).

Liliana Marie Prikler <liliana.prikler@gmail.com> writes:

> Hi,
>
> Am Sonntag, den 12.09.2021, 15:40 -0700 schrieb Sarah Morgensen:
>> > > +       (patches
>> > > +        (search-patches
>> > > +         "zig-disable-libc-note-test.patch"
>> > Is this test really necessary to skip that test?  If not, let's try
>> > to use the command line for that.
>> 
>> We could use "-Dskip-compile-errors", but that also skips ~600 other
>> test cases.
> Point taken, let's keep it then.
>
>> > > +         ;; XXX: Remove the following patch when updating LLVM
>> > > to 12.0.1.
>> > > +         "zig-disable-MIPS-tests.patch"
>> > There's a patch for LLVM 12.0.1 waiting in the ML and we could
>> > potentially bump lld to 12.0.1 regardless.  (Can LLVM components be
>> > mix-matched like that?)
>> 
>> I have no idea if they *can*, but I'm pretty sure they're not
>> intended to be, as LLVM wants you to build everything together in one
>> big blob.
> Fair enough, I've tried to rebase this based on András patch
> regardless.  In some sense this counts as a review of #50486, but I
> obviously haven't tested all the problematic packages that would keep
> it from being merged, like mesa.
>
>> > > +         "zig-fix-cross-native-execution.patch"
>> > IIUC this is weaker than "-Dskip-non-native".  Is there a reason to
>> > include specifically these non-native tests?
>> 
>> Yes, as I wrote in the patch header, it fixes the behavior of 'zig
>> run' and 'zig test' when the target is cross-native.  Would we want
>> to stick to upstream, even if it's buggy?
> I'm not particularly sure about 'zig run', but imo we should simply
> supply the correct linker in cross-native and not worry about upstream
> bugs in the negative case.
>
>> We might want to add "-Dskip-non-native" anyway as it speeds up tests
>> by an order of magnitude, in which case tests will succeed without
>> the patch.  It looks their CI uses it "-Dskip-non-native" as well,
>> and I suppose there's not a whole lot Guix can do to mess up Zig's
>> cross-compiling anyway, since it's pretty self-contained...
> Did that.
>
>> > > +    (native-search-paths
>> > > +     (list
>> > > +      (search-path-specification
>> > > +       (variable "ZIG_INCLUDE_DIRS")
>> > > +       ;; XXX: It doesn't seem as though Zig can distinguish
>> > > between
>> > > C and C++
>> > > +       ;;      include paths, so provide both.
>> > > +       (files '("include/c++" "include")))
>> > > +      (search-path-specification
>> > > +       ;; TODO: Might be confused with "ZIG_LIB_DIR"... Maybe
>> > > use
>> > > +       ;;       "ZIG_INCLUDE_PATH" and "ZIG_LIBRARY_PATH"?
>> > > +       (variable "ZIG_LIB_DIRS")
>> > > +       (files '("lib" "lib64")))))
>> > You can rewrite "zig-use-explicit-paths.patch" in-place with Emacs'
>> > query-replace and/or sed (or even just manually, there are no lines
>> > to add or remove) if you disagree with my environment variable
>> > naming choice.  Just make sure you don't accidentally break diff by
>> > deleting trailing space.
>> > Another potential naming choice would be to prefix everything with
>> > ZIG_LIBC_ rather than simply ZIG_.  Of course I thought about that
>> > only after sending my previous mail ^^"
>> 
>> Ah, I meant to mention it in my last e-mail but I forgot.  I didn't
>> want to just go changing it on you without discussing it.
>> 
>> As far as I can tell, there's no such thing as a "Zig library" or a
>> "Zig header"; these are for including system C headers and
>> libraries.  So, I would just go with LIBRARY_PATH and
>> CPLUS_INCLUDE_PATH unless we anticipate needing to tell Zig something
>> different than what we tell GCC/Clang.  Furthermore, the in-
>> development 'zig cc' command is intended to be a drop-in replacement
>> for GCC/Clang, so it should probably honor the same environment
>> variables.
> Fair enough, I now have zig search the paths that would normally be
> expected to be accordingly set.  This leads to doubly adding
> "/include", but I suppose that's fine as we risk not including the
> right things in a C only context otherwise.
>
> Regards
>
> [2. text/x-patch; v4-0001-gnu-lld-Update-to-12.0.1.patch]...
>
> [3. text/x-patch; v4-0002-gnu-Add-zig.patch]...

--
Sarah




  reply	other threads:[~2021-09-24  0:18 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <a1922b0a2ec237d217af54ed3ff7065e360d994c.camel@gmail.com>
2021-09-09  1:43 ` [bug#50449] [PATCH] Add zig Andrew Patterson
2021-09-09 13:32 ` [bug#47006] [PATCH 1/2] gnu: lld: Update to 12.0.0 Liliana Prikler
2021-09-09 13:32 ` [bug#47006] [PATCH 2/2] gnu: Add zig Liliana Prikler
2021-09-09 16:31   ` [bug#50449] " Sarah Morgensen
2021-09-09 18:18     ` Liliana Marie Prikler
2021-09-09 18:49       ` [bug#47006] [bug#50449] " Sarah Morgensen
2021-09-09 13:32         ` [bug#47006] [WIP PATCH v2 " Liliana Prikler
     [not found]           ` <0f6c5b692df8d06a0d7adddc9e5abf93894a366f.1631226695.git.liliana.prikler@gmail.com>
2021-09-11  9:52             ` iskarian
2021-09-11 19:24           ` Sarah Morgensen
2021-09-11 20:01             ` [bug#39480] " Liliana Marie Prikler
2021-09-12  4:42               ` Sarah Morgensen
2021-09-12  7:32                 ` Liliana Marie Prikler
2021-09-12  7:39                   ` Liliana Marie Prikler
2021-09-12 22:40                   ` Sarah Morgensen
2021-09-14 16:17                     ` Liliana Marie Prikler
2021-09-24  0:17                       ` Sarah Morgensen [this message]
2021-09-09 13:32                         ` [bug#50449] [PATCH v5] " Liliana Prikler
2021-10-31  8:06                           ` [bug#47006] " Liliana Marie Prikler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=867df6kesn.fsf@mgsn.dev \
    --to=iskarian@mgsn.dev \
    --cc=50449@debbugs.gnu.org \
    --cc=liliana.prikler@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.