unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: kiasoc5--- via "Development of GNU Guix and the GNU System distribution." <guix-devel@gnu.org>
To: zimoun <zimon.toutoune@gmail.com>
Cc: Guix Devel <guix-devel@gnu.org>
Subject: Re: Hardened toolchain
Date: Tue, 22 Mar 2022 21:02:13 +0100 (CET)	[thread overview]
Message-ID: <MynDFPw--3-2@tutanota.com> (raw)
In-Reply-To: <86y2119580.fsf@gmail.com>

Mar 22, 2022, 19:06 by zimon.toutoune@gmail.com:

> Hi,
>
> (Although you know :) please keep CC guix-devel.) 
>
Will remember to CC guix-devel next time.

> On Tue, 22 Mar 2022 at 18:23, kiasoc5@tutanota.com wrote:
>
>>> --8<---------------cut here---------------start------------->8---
>>> (define (make-gcc-hardened gcc)
>>>  (package
>>>  (inherit gcc)
>>>  (arguments
>>>  (substitute-keyword-arguments (package-arguments gcc)
>>>  ((#:configure-flags flags
>>>  `(append (list "--enable-default-ssp" "--enable-default-pie")
>>>  ,flags)))))))
>>>
>>> (define-public gcc-hardened
>>>  (make-gcc-hardened gcc))
>>> --8<---------------cut here---------------end--------------->8---
>>>
>
> [...]
>
>>
>> I get an error when I build with guix, if you could help find it that
>> would be great.
>>
>> % ./pre-inst-env guix build -f hardened.scm
>> /home/kiasoc5/build/guix-notes/hardening/hardened.scm:11:10: error: (substitute-keyword-arguments (package-arguments gcc) ((#:configure-flags flags (quasiquote (append (list "--enable-default-ssp" "--enable-default-pie") (unquote flags)))))): source expression failed to match any pattern
>>
>
> That’s because a typo. :-)
>
Silly me, thanks for the catch. I'll let you know how the hardened gcc goes.

>  ((#:configure-flags flags
>  ^missing closing parenthesis.  Well, it looks like:
>
> --8<---------------cut here---------------start------------->8---
> (use-modules (gnu)
>  (guix)
>  (guix packages))
>
> (use-package-modules gcc)
>
> (define (make-gcc-hardened gcc)
>  (package
>  (inherit gcc)
>  (arguments
>  (substitute-keyword-arguments (package-arguments gcc)
>  ((#:configure-flags flags)
>  `(append (list "--enable-default-ssp"
>  "--enable-default-pie")
>  ,flags))))))
>
> (define-public gcc-hardened
>  (make-gcc-hardened gcc))
>
> gcc-hardened
> --8<---------------cut here---------------end--------------->8---
>
> Then, this command
>
>  guix build -f hardened.scm -n
>
> returns:
>
> --8<---------------cut here---------------start------------->8---
> substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0%
> substitute: updating substitutes from 'https://bordeaux.guix.gnu.org'... 100.0%
> The following derivation would be built:
>  /gnu/store/3i6i3pqr5r7l1568b3hswbgych974aqw-gcc-10.3.0.drv
> 81.4 MB would be downloaded:
>  /gnu/store/7vrx4p62bkmxzrxwqdc4il9hqyh1yngh-libstdc++-10.3.0
>  /gnu/store/i459ksarhxysqb8gxa8hq6phl13d0q4a-libstdc++-headers-10.3.0
>  /gnu/store/d3js6699lc1p0sw7p0dkafi0cn33sig6-gcc-10.3.0.tar.xz
> --8<---------------cut here---------------end--------------->8---
>
> I do not have tried to effectively build this gcc-hardened. :-)
>
> Hope that helps.
>
> Cheers,
> simon
>



  reply	other threads:[~2022-03-22 20:03 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-21 13:34 Hardened toolchain zimoun
     [not found] ` <Mymdzxm--3-2@tutanota.com>
2022-03-22 19:06   ` zimoun
2022-03-22 20:02     ` kiasoc5--- via Development of GNU Guix and the GNU System distribution. [this message]
2022-03-25 19:39       ` kiasoc5--- via Development of GNU Guix and the GNU System distribution.
2022-03-25 22:54         ` zimoun
2022-03-26 19:33           ` kiasoc5--- via Development of GNU Guix and the GNU System distribution.
2022-03-26 22:02             ` kiasoc5--- via Development of GNU Guix and the GNU System distribution.
2022-03-27 20:06             ` zimoun
2022-03-27 20:22 ` Maxime Devos
2022-03-28  3:17   ` Maxim Cournoyer
2022-03-28  7:35     ` zimoun
2022-03-29  0:02     ` kiasoc5--- via Development of GNU Guix and the GNU System distribution.
2022-03-29 10:15     ` Ludovic Courtès
2022-04-14 18:59       ` kiasoc5--- via Development of GNU Guix and the GNU System distribution.
2022-04-15 15:18       ` jbranso
2022-04-15 16:04         ` Zhu Zihao
2022-04-15 16:34           ` raingloom
2022-04-26 11:07             ` Katherine Cox-Buday
2022-04-28 17:36               ` Aurora
2022-04-28 17:41                 ` Katherine Cox-Buday
2022-04-28 19:53                   ` Aurora
2022-04-28 17:50                 ` Vagrant Cascadian
2022-04-28 19:54                   ` Aurora
2022-04-29 10:31       ` zimoun
2022-04-29 15:51         ` kiasoc5--- via Development of GNU Guix and the GNU System distribution.
2022-05-02 14:55         ` Katherine Cox-Buday
2022-05-02 16:25         ` Maxime Devos
2022-05-02 17:41           ` zimoun
2022-05-02 21:10             ` Maxime Devos
  -- strict thread matches above, loose matches on Subject: below --
2022-04-15 20:36 Nathan Dehnel
2022-04-16  3:51 ` raingloom
2022-03-21  4:31 kiasoc5--- via Development of GNU Guix and the GNU System distribution.

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

  List information: https://guix.gnu.org/

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

  git send-email \
    --in-reply-to=MynDFPw--3-2@tutanota.com \
    --to=guix-devel@gnu.org \
    --cc=kiasoc5@tutanota.com \
    --cc=zimon.toutoune@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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).