I hereby claim:
- I am nh2 on github.
- I am nh2 (https://keybase.io/nh2) on keybase.
- I have a public key ASDKBpC_rW52PREKyp33ebXJ9PYSfVhlvco2_3mZ2QiMOQo
To claim this, I am signing this object:
# Example usage: | |
# | |
# src = filterSourceConvenience.filter ./. { | |
# srcDirs = [ | |
# ./src | |
# ./app | |
# ./images | |
# ]; | |
# srcFiles = [ | |
# ./mypackage.cabal |
I hereby claim:
To claim this, I am signing this object:
Originally from #ghc on freenode, 2018-12-16:
Most of the checks seem to actually be no-ops for cross-compilation.
E.g. checking for working strnlen
is just hardcoded to "yes" on all targets but AIX (in similar other cases, it just prints "guessing yes").
For checking size of int *
, it does a binary search as you say, and NOT invoke the compiled programs.
It does it by generating a static array with known size, like arr[1 - 2 * (sizeof(int*) <= BINARY_SEARCH_VAR)], so that the static size is either [1] or [-1]. C compilers happen to complain about arrays of negative static size, so that's how it figures that out.
See ac_fn_c_compute_int()
.
To see this, I use for compilation of GNU hello, the following added to configure.ac
:
with import <nixpkgs> {}; | |
stdenv.mkDerivation { | |
name = "bluez-patched-systemd-unit"; | |
buildCommand = let | |
in '' | |
set -eo pipefail | |
cp -rvs ${pkgs.bluez} --no-preserve=mode $out | |
sed --in-place 's:bluetooth/bluetoothd:bluetooth/bluetoothd -P:g' $out/etc/systemd/system/bluetooth.service | |
''; |
$ dmesg | |
[ 0.000000] microcode: CPU0 microcode updated early to revision 0x1f, date = 2018-02-07 | |
[ 0.000000] Initializing cgroup subsys cpuset | |
[ 0.000000] Initializing cgroup subsys cpu | |
[ 0.000000] Initializing cgroup subsys cpuacct | |
[ 0.000000] Linux version 4.4.0-131-generic (buildd@lgw01-amd64-015) (gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.10) ) #157-Ubuntu SMP Thu Jul 12 15:51:36 UTC 2018 (Ubuntu 4.4.0-131.157-generic 4.4.134) | |
[ 0.000000] Command line: BOOT_IMAGE=/vmlinuz-4.4.0-131-generic root=/dev/mapper/vg0-ubuntu1604 ro console=tty1 console=ttyS0,115200 | |
[ 0.000000] KERNEL supported cpus: | |
[ 0.000000] Intel GenuineIntel | |
[ 0.000000] AMD AuthenticAMD |
{-# LANGUAGE NamedFieldPuns #-} | |
{-# LANGUAGE OverloadedStrings #-} | |
{-# OPTIONS_GHC -Wall #-} | |
import Control.Concurrent.Async (forConcurrently_) | |
import Data.Foldable (for_) | |
import Data.List (intercalate) | |
import qualified Data.Map as Map | |
import Data.Semigroup ((<>)) | |
import qualified Data.Text as T |
#0 0x00007f5b1ebe458f in pthread_cond_wait@@GLIBC_2.3.2 () from /nix/store/hwwqshlmazzjzj7yhrkyjydxamvvkfd3-glibc-2.26-131/lib/libpthread.so.0 | |
#1 0x0000000001d06f69 in waitCondition () | |
#2 0x0000000001cf533b in yieldCapability () | |
#3 0x0000000001cf26c9 in schedule () | |
#4 0x0000000001cf37ac in scheduleWorker () | |
#5 0x00007f5b1ebde2a7 in start_thread () from /nix/store/hwwqshlmazzjzj7yhrkyjydxamvvkfd3-glibc-2.26-131/lib/libpthread.so.0 | |
#6 0x00007f5b002a757f in clone () from /nix/store/hwwqshlmazzjzj7yhrkyjydxamvvkfd3-glibc-2.26-131/lib/libc.so.6 |
.file "lz4frame.c" | |
.text | |
.Ltext0: | |
.section .text.unlikely,"ax",@progbits | |
.LCOLDB0: | |
.text | |
.LHOTB0: | |
.p2align 4,,15 | |
.section .text.unlikely | |
.Ltext_cold0: |
Using ghc-8.2.2 | |
-g -optc-g -opta-g -optc-Wa,-g -opta-Wa,-g | |
passes -g to as | |
-g -optc-g -opta-g -optc-Wa,-g | |
does not pass -g to as | |
-g -optc-g -opta-g -opta-Wa,-g | |
passes -g to as |
#!/usr/bin/env python3 | |
import argparse | |
import copy | |
import json | |
import sys | |
def migrate(input_dict): | |
j = copy.deepcopy(input_dict) |