File: meson.build

package info (click to toggle)
qemu 1%3A10.0.3%2Bds-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 413,680 kB
  • sloc: ansic: 4,733,433; pascal: 114,769; python: 105,506; asm: 68,431; sh: 52,881; makefile: 27,469; perl: 18,778; cpp: 11,435; xml: 3,404; objc: 2,877; yacc: 2,505; php: 1,299; tcl: 1,296; lex: 1,110; sql: 71; awk: 43; sed: 35; javascript: 7
file content (54 lines) | stat: -rw-r--r-- 1,167 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
project('qboot', 'c', meson_version: '>=0.49.0')

cc = meson.get_compiler('c')
objcopy = find_program('objcopy')

c_args = [
  '-m32',
  '-march=i386',
  '-mregparm=3',
  '-fno-stack-protector',
  '-fno-delete-null-pointer-checks',
  '-ffreestanding',
  '-mstringop-strategy=rep_byte',
  '-minline-all-stringops',
  '-fno-pic',
]

link_args = ['-nostdlib', '-m32']
link_args += cc.get_supported_link_arguments('-Wl,--build-id=none')
link_args += '-Wl,-T' + meson.current_source_dir() / 'flat.lds'
link_args += cc.get_supported_link_arguments(['-no-pie'])
link_args += cc.get_supported_link_arguments(['-fno-lto'])

elf = executable(
  'bios.bin.elf',
  files(
    'code16.c',
    'code32seg.c',
    'cstart.S',
    'entry.S',
    'fw_cfg.c',
    'hwsetup.c',
    'linuxboot.c',
    'main.c',
    'malloc.c',
    'mptable.c',
    'pci.c',
    'printf.c',
    'string.c',
    'smbios.c',
    'tables.c',
  ),
  c_args: c_args,
  include_directories: include_directories('include'),
  link_args: link_args,
)

bin = custom_target(
  'bios.bin',
  output: 'bios.bin',
  input: elf,
  command: [objcopy, '-O', 'binary', '@INPUT@', '@OUTPUT@'],
  build_by_default: true,
)