| 1 | 1 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 2 | 1 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 3 | package Acme::Alien::__cpu_model; | ||
| 4 | |||
| 5 | # ABSTRACT: Provides the __cpu_mode symbol | ||
| 6 | 1 | our $VERSION = '0.001'; # VERSION | |
| 7 | |||
| 8 | 1 | ▶ | use parent 'Alien::Base'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 9 | |||
| 10 | =pod | ||
| 11 | |||
| 12 | =encoding utf8 | ||
| 13 | |||
| 14 | =head1 NAME | ||
| 15 | |||
| 16 | Acme::Alien::__cpu_model - Provides the __cpu_model symbol | ||
| 17 | |||
| 18 | |||
| 19 | =head1 SYNOPSIS | ||
| 20 | |||
| 21 | use ExtUtils::MakeMaker; | ||
| 22 | WriteMakefile( | ||
| 23 | # ... | ||
| 24 | |||
| 25 | LIBS => Acme::Alien::__cpu_model->libs, | ||
| 26 | ); | ||
| 27 | |||
| 28 | |||
| 29 | =head1 DESCRIPTION | ||
| 30 | |||
| 31 | Older GCCs, and some recent Clangs, like my Apple LLVM 8.0.0 (clang-800.0.42.1), lack the C<__cpu_model> builtin, which some libraries like GLFW depend on. | ||
| 32 | |||
| 33 | This package provides a useless definition, that allows packages using GLFW on such a system to link. As long you don't use any function, that depends on the exact value of C<__cpu_model>, all should be well. | ||
| 34 | |||
| 35 | =head1 IMPLEMENTATION | ||
| 36 | |||
| 37 | const struct __processor_model { | ||
| 38 | unsigned int __cpu_vendor; | ||
| 39 | unsigned int __cpu_type; | ||
| 40 | unsigned int __cpu_subtype; | ||
| 41 | unsigned int __cpu_features[1]; | ||
| 42 | } __cpu_model; | ||
| 43 | |||
| 44 | An archive is created with a single (non-COMMON) __cpu_model symbol | ||
| 45 | |||
| 46 | |||
| 47 | =cut | ||
| 48 | |||
| 49 | 1 | 1; | |
| 50 | __END__ | ||