text:
At = {2013-08-11 15:16:39},
	Priority = {3},
	Title = {Changing objects lead briefly flashed ones},
	Url = {http://dx.doi.org/10.1038/74865},
	Volume = {3},
	Year = {2000},
	Bdsk-Url-1 = {http://dx.doi.org/10.1038/74865}}

@article{Whitney98,
	Author = {Whitney, David and Murakami, Ikuya},
	Citeulike-Article-Id = {12550840},
	Citeulike-Linkout-0 = {http://dx.doi.org/10.1038/3659},
	Citeulike-Linkout-1 = {http://dx.doi.org/10.1038/nn1298\_656},
	Date-Added = {2013-08-30 09:50:23 +0200},
	Date-Modified = {2017-02-10 12:38:01 +0000},
	Doi = {10.1038/3659},
	Journal = {Nat Neurosci},
	Keywords = {motion\_anticipation, motionextrapolation, neural\_delays, thesis},
	Month = dec,
	Number = {8},
	Pages = {656--657},
	Posted-At = {2013-08-11 15:12:30},
	Priority = {2},
	Title = {Latency difference, not spatial extrapolation},
	Url = {http://dx.doi.org/10.1038/3659},
	Volume = {1},
	Year = {1998},
	Bdsk-Url-1 = {http://dx.doi.org/10.1038/3659}}

@article{Mateeff81,
	Abstract = {{Experimental findings concerning the properties of the phenomenon of mislocation of brief visual stimuli during smooth eye tracking are described. One of these, which cannot be explained by existing hypotheses, is that under certain conditions the mislocation magnitude tends to have zero or even negative values. A model is developed for explanation of the mislocation phenomenon. It is suggested that localization is based on: (1) information about the current eye position and (2) information about the stimulus locus on the retina. They both arrive at the localization centre with non-zero delays. The mode of information processing in this centre leads to a magnitude of mislocation which is proportional to the difference between the two delays and which could be positive, zero or negative. Factors which influence either delay should also influence the mislocation magnitude.}},
	Author = {Mateeff, S. and Yakimoff, N. and Dimitrov, G.},
	Citeulike-Article-Id = {12550834},
	Citeulike-Linkout-0 = {http://dx.doi.org/10.1016/0001-6918(81)90055-x},
	Date-Added = {2013-08-30 09:50:23 +0200},
	Date-Modified = {2013-08-30 09:50:23 +0200},
	Doi = {10.1016/0001-6918(81)90055-x},
	Issn = {00016918},
	Journal = {Acta Psychologica},
	Keywords = {motion\_anticipation, neural\_delays, thesis},
	Month = jan,
	Number = {1-3},
	Pages = {133--140},
	Posted-At = {2013-08-11 15:06:59},
	Priority = {3},
	Title = {Localization of brief visual stimuli during pursuit eye movements},
	Url = {http://dx.doi.org/10.1016/0001-6918(81)90055-x},
	Volume = {48},
	Year = {1981},
	Bdsk-Url-1 = {http://dx.doi.org/10.1016/0001-6918(81)90055-x}}

@article{Nijhawan04,
	Abstract = {{There are significant neural transmission and processing delays within the nervous system. How then are behaviours observed both in nature and high-speed ball games, which require temporal accuracy to within several milliseconds, possible? Until recently, most investigators attributed the observed success in interceptive behaviours to learning or prediction built into motor programs that take these delays into account. Several investigators have proposed, however, that sensory mechanisms also contribute to compensation. Sensory compensation is particularly important when moving objects are the targets of interceptive behaviour, as in this case neural delays in the visual system could lead to errors in the communication of crucial position information of the object of interest. However, given the biological significance of visual motion the visual system could have evolved neural pathways optimized for the rapid transmission of motion signals. Alternatively, the visual system could take a sample of visual motion and compensate for the delays through prediction based on the sample. This mechanism is the visual analogue of the previously proposed internal forward model for motor control. We conducted four experiments using the flash-lag effect to ask if the nervous system is naturally geared to processing moving items with a speed greater than stationary flashes. Our results show that the nervous system does not process moving items more quickly than stationary flashes.}},
	Author = {Nijhawan, Romi and Watanabe, Katsumi and Khurana Beena and Shimojo, Shinsuke},
	Citeulike-Article-Id = {12550401},
	Citeulike-Linkout-0 = {http://web.ebscohost.com.gate1.inist.fr/ehost/detail?vid=3\&\#38;sid=c40531b5-4a8d-48e4-8916-00de4c522855\%40sessionmgr198\&\#38;hid=108\&\#38;bdata=Jmxhbmc9ZnImc2l0ZT1laG9zdC1saXZl\#db=pbh\&\#38;AN=12252348},
	Date-Added = {2013-08-30 09:50:23 +0200},
	Date-Modified = {2014-07-21 17:48:37 +0000},
	Issn = {1350-6285},
	Journal = {Visual cognition},
	Keywords = {motion\_anticipation, neural\_delays, thesis},
	Number = {2-3},
	Pages = {275--298},
	Posted-At = {2013-08-10 19:01:09},
	Priority = {3},
	Title = {Compensation of neural delays in visual-motor behaviour: No evidence for shorter afferent delays for visual motion},
	Url = {http://web.ebscohost.com.gate1.inist.fr/ehost/detail?vid=3\&\#38;sid=c40531b5-4a8d-48e4-8916-00de4c522855\%40sessionmgr198\&\#38;hid=108\&\#38;bdata=Jmxhbmc9ZnImc2l0ZT1laG9zdC1saXZl\#db=pbh\&\#38;AN=12252348},
	Volume = {11},
	Year = {2004}}

@article{Kerzel03,
	Abstract = {{ Moving objects change their position until signals from the photoreceptors arrive in the visual cortex. Nonetheless, motor responses to moving objects are accurate and do not lag behind the real-world position. The questions are how and where neural delays are compensated for. It was suggested that compensation is achieved within the visual system by extrapolating the position of moving objects. A visual illusion supports this idea: when a briefly flashed object is presented in the same position as a moving object, it appears to lag behind. However, moving objects do not appear ahead of their final or reversal points. We investigated a situation where participants localized the final position of a moving stimulus. Visual perception and short-term memory of the final target position were accurate, but reaching movements were directed toward future positions of the target beyond the vanishing point. Our results show that neuronal latencies are not compensated for at early stages of visual processing, but at a late stage when retinotopic information is transformed into egocentric space used for motor responses. The sensorimotor system extrapolates the position of moving targets to allow for precise localization of moving targets despite neuronal latencies. }},
	Author = {Kerzel, Dirk and Gegenfurtner, Karl R.},
	Citeulike-Article-Id = {12550346},
	Citeulike-Linkout-0 = {http://view.ncbi.nlm.nih.gov/pubmed/14614823},
	Citeulike-Linkout-1 = {http://www.hubmed.org/display.cgi?uids=14614823},
	Date-Added = {2013-08-30 09:50:23 +0200},
	Date-Modified = {2013-08-30 09:50:23 +0200},
	Day = {11},
	Issn = {0960-9822},
	Journal = {Current biology : CB},
	Keywords = {motion\_anticipation, neural\_delays, thesis},
	Month = nov,
	Number = {22},
	Pages = {1975--1978},
	Pmid = {14614823},
	Posted-At = {2013-08-10 18:48:18},
	Priority = {3},
	Title = {Neuronal processing delays are compensated in the sensorimotor branch of the visual system.},
	Url = {http://view.ncbi.nlm.nih.gov/pubmed/14614823},
	Volume = {13},
	Year = {2003},
	Bdsk-Url-1 = {http://view.ncbi.nlm.nih.gov/pubmed/14614823}}

@article{Nijhawan02,
	Abstract = {{In the primate visual system, there is a significant delay in the arrival of photoreceptor signals in visual cortical areas. Since Helmholtz, scientists have pondered over the implications of these delays for human perception. Do visual delays cause the ' position of a moving object to lag its 'real' position? This question has recently been re-evaluated in the context of the flash-lag phenomenon, in which a flashed object appears to lag behind a moving object, when physically the two objects are co-localized at the instant of the flash. This article critically examines recent accounts of this phenomenon, assesses its biological significance, and offers new hypotheses.}},
	Author = {Nijhawan, Romi},
	Citeulike-Article-Id = {1390687},
	Citeulike-Linkout-0 = {http://view.ncbi.nlm.nih.gov/pubmed/12200181},
	Citeulike-Linkout-1 = {http://www.hubmed.org/display.cgi?uids=12200181},
	Date-Added = {2013-08-30 09:50:23 +0200},
	Date-Modified = {2013-08-31 20:26:55 +0000},
	Day = {1},
	Issn = {1879-307X},
	Journal = {Trends in cognitive sciences},
	Keywords = {motion\_anticipation, neural\_delays, thesis},
	Month = sep,
	Number = {9},
	Pmid = {12200181},
	Posted-At = {2013-08-10 18:43:50},
	Priority = {3},
	Title = {Neural delays, visual motion and the flash-lag effect.},
	Url = {http://view.ncbi.nlm.nih.gov/pubmed/12200181},
	Volume = {6},
	Year = {2002},
	Bdsk-Url-1 = {http://view.ncbi.nlm.nih.gov/pubmed/12200181}}

@article{Alink10,
	Abstract = {{In this functional magnetic resonance imaging study we tested whether the predictability of stimuli affects responses in primary visual cortex (V1). The results of this study indicate that visual stimuli evoke smaller responses in V1 when their onset or motion direction can be predicted from the dynamics of surrounding illusory motion. We conclude from this finding that the human brain anticipates forthcoming sensory input that allows predictable visual stimuli to be processed with less neural activation at early stages of cortical processing.}},
	Author = {Alink, Arjen and Schwiedrzik, Caspar M. and Kohler, Axel and Singer, Wolf and Muckli, Lars},
	Citeulike-Article-Id = {6806603},
	Citeulike-Linkout-0 = {http://dx.doi.org/10.1523/jneurosci.3730-10.2010},
	Citeulike-Linkout-1 = {http://www.jneurosci.org/content/30/8/2960.abstract},
	Citeulike-Linkout-2 = {http://www.jneurosci.org/content/30/8/2960.full.pdf},
	Citeulike-Linkout-3 = {http://www.jneurosci.org/cgi/content/abstract/30/8/2960},
	Citeulike-Linkout-4 = {http://view.ncbi.nlm.nih.gov/pubmed/20181593},
	Citeulike-Linkout-5 = {http://www.hubmed.org/display.cgi?uids=20181593},
	Date-Added = {2013-08-30 09:50:23 +0200},
	Date-Modified = {2013-08-30 09:50:23 +0200},
	Day = {24},
	Doi = {10.1523/jneurosci.3730-10.2010},
	Issn = {1529-2401},
	Journal = {The Journal of Neuroscience},
	Keywords = {area-v1, motion\_anticipation, predictive-coding, thesis},
	Month = feb,
	Number = {8},
	Pages = {2960--2966},
	Pmid = {20181593},
	Posted-At = {2013-07-04 10:02:23},
	Priority = {2},
	Publisher = {Society for Neuroscience},
	Title = {Stimulus Predictability Reduces Responses in Primary Visual Cortex},
	Url = {http://dx.doi.org/10.1523/jneurosci.3730-10.2010},
	Volume = {30},
	Year = {2010},
	Bdsk-Url-1 = {http://dx.doi.org/10.1523/jneurosci.3730-10.2010}}

@article{Harison07,
	Abstract = {{The aim of this study was to measure the contextual influence of globally coherent motion on visual cortical responses using functional magnetic resonance imaging. Our motivation was to test a prediction from representational theories of perception (i.e. predictive coding) that primary visual responses should be suppressed by top-down influences during coherent motion. We used a sparse stimulus array such that each element could not fall within the same classical receptive field of primary visual cortex neurons (i.e. precluding lateral interactions within V1). This enabled us to attribute differences, in striate cortex responses, to extra-classical receptive field effects mediated by backward connections. In accord with theoretical predictions we were able to demonstrate suppression of striate cortex activations to coherent relative to incoherent motion. These results suggest that suppression of primary visual cortex responses to coherent motion reflect extra-classical effects mediated by backward connections.}},
	Author = {Harrison, L. M. and Stephan, K. E. and Rees, G. and Friston, Karl J.},
	Citeulike-Article-Id = {7340195},
	Citeulike-Linkout-0 = {http://dx.doi.org/10.1016/j.neuroimage.2006.10.017},
	Citeulike-Linkout-1 = {http://www.ncbi.nlm.nih.gov/pmc/articles/PMC2640483/},
	Citeulike-Linkout-2 = {http://view.ncbi.nlm.nih.gov/pubmed/17169579},
	Citeulike-Linkout-3 = {http://www.hubmed.org/display.cgi?uids=17169579},
	Date-Added = {2013-08-30 09:50:23 +0200},
	Date-Modified = {2015-11-16 13:16:24 +0000},
	Day = {1},
	Doi = {10.1016/j.neuroimage.2006.10.017},
	Issn = {1053-8119},
	Journal = {NeuroImage},
	Keywords = {area-v1, motion\_anticipation, thesis},
	Month = feb,
	Number = {3},
	Pages = {1199--1208},
	Pmcid = {PMC2640483},
	Pmid = {17169579},
	Posted-At = {2013-07-04 09:52:16},
	Priority = {2},
	Title = {Extra-classical receptive field effects measured in striate cortex with fMRI.},
	Url = {http://dx.doi.org/10.1016/j.neuroimage.2006.10.017},
	Volume = {34},
	Year = {2007},
	Bdsk-Url-1 = {http://dx.doi.org/10.1016/j.neuroimage.2006.10.017}}

@article{Stettler02,
	Abstract = {{Two components of cortical circuits could mediate contour integration in primary visual cortex (V1): intrinsic horizontal connections and feedback from higher cortical areas. To distinguish between these, we combined functional mapping with a new technique for labeling axons, a recombinant adenovirus bearing the gene for green fluorescent protein (GFP), to determine the extent, density, and orientation specificity of V1 intrinsic connections and V2 to V1 feedback. Both connections cover portions of V1 representing regions of visual space up to eight times larger than receptive fields as classically defined, though the intrinsic connections are an order of magnitude denser than the feedback. Whereas the intrinsic connections link similarly oriented domains in V1, V2 to V1 feedback displays no such specificity. These findings suggest that V1 intrinsic horizontal connections provide a more likely substrate for contour integration.}},
	Author = {Stettler, Dan D. and Das, Aniruddha and Bennett, Jean and Gilbert, Charles D.},
	Citeulike-Article-Id = {12458747},
	Citeulike-Linkout-0 = {http://www.cell.com/neuron/abstract/S0896-6273(02)01029-2},
	Citeulike-Linkout-1 = {http://dx.doi.org/au\%20\%20-\%20stettler,\%20dan\%20d},
	Date-Added = {2013-08-30 09:50:23 +0200},
	Date-Modified = {2013-08-30 09:50:23 +0200},
	Day = {14},
	Doi = {au\%20\%20-\%20stettler,\%20dan\%20d},
	Journal = {Neuron},
	Keywords = {motion\_anticipation},
	Month = nov,
	Number = {4},
	Pages = {739--750},
	Posted-At = {2013-07-03 15:18:29},
	Priority = {2},
	Publisher = {Cell Press,},
	Title = {Lateral Connectivity and Contextual Interactions in Macaque Primary Visual Cortex},
	Url = {http://dx.doi.org/au\%20\%20-\%20stettler,\%20dan\%20d},
	Volume = {36},
	Year = {2002},
	Bdsk-Url-1 = {http://dx.doi.org/au%5C%20%5C%20-%5C%20stettler,%5C%20dan%5C%20d},
	Bdsk-Url-2 = {http://dx.doi.org/20%5C%2520-%5C%2520stettler,%5C%2520dan%5C%2520d}}

@article{Vinje02,
	Abstract = {{We have investigated how the nonclassical receptive field (nCRF) affects information transmission by V1 neurons during simulated natural vision in awake, behaving macaques. Stimuli were centered over the classical receptive field (CRF) and stimulus size was varied from one to four times the diameter of the CRF. Stimulus movies reproduced the spatial and temporal stimulus dynamics of natural vision while maintaining constant CRF stimulation across all sizes. In individual neurons, stimulation of the nCRF significantly increases the information rate, the information per spike, and the efficiency of information transmission. Furthermore, the population averages of these quantities also increase significantly with nCRF stimulation. These data demonstrate that the nCRF increases the sparseness of the stimulus representation in V1, suggesting that the nCRF tunes V1 neurons to match the highly informative components of the natural world.}},
	Author = {Vinje, William E. and Gallant, Jack L.},
	Citeulike-Article-Id = {3080309},
	Citeulike-Linkout-0 = {http://www.jneurosci.org/content/22/7/2904.abstract},
	Citeulike-Linkout-1 = {http://www.jneurosci.org/content/22/7/2904.full.pdf},
	Citeulike-Linkout-2 = {http://www.jneurosci.org/cgi/content/abstract/22/7/2904},
	Citeulike-Linkout-3 = {http://view.ncbi.nlm.nih.gov/pubmed/11923455},
	Citeulike-Linkout-4 = {http://www.hubmed.org/display.cgi?uids=11923455},
	Date-Added = {2013-08-30 09:50:23 +0200},
	Date-Modified = {2013-08-30 09:50:23 +0200},
	Day = {01},
	Issn = {1529-2401},
	Journal = {The Journal of Neuroscience},
	Keywords = {motion\_anticipation},
	Month = apr,
	Number = {7},
	Pages = {2904--2915},
	Pmid = {11923455},
	Posted-At = {2013-07-03 09:24:07},
	Priority = {3},
	Publisher = {Society for Neuroscience},
	Title = {Natural Stimulation of the Nonclassical Receptive Field Increases Information Transmission Efficiency in V1},
	Url = {http://www.jneurosci.org/content/22/7/2904.abstract},
	Volume = {22},
	Year = {2002},
	Bdsk-Url-1 = {http://www.jneurosci.org/content/22/7/2904.abstract}}

@article{Chacron03,
	Abstract = {{Animals have developed stereotyped communication calls to which specific sensory neurons are well tuned. These communication calls must be discriminated from environmental signals such as those produced by prey. Sensory systems might have evolved neural circuitry to encode both categories. In weakly electric fish, prey and communication signals differ in their spatial extent and frequency content. Here we show that stimuli of different spatial extents mimicking prey and communication signals cause a switch in the frequency tuning and spike-timing precision of electrosensory pyramidal neurons, resulting in the selective and optimal encoding of both stimulus categories. As in other sensory systems, pyramidal neurons respond only to stimuli located within a restricted region of space known as the classical receptive field (CRF). In some systems, stimulation outside the CRF but within a non-classical receptive field (nCRF) can modulate the neural response to CRF stimulation even though nCRF stimulation alone fails to elicit responses. We show that pyramidal neurons possess a nCRF and that it can modulate the response to CRF stimuli to induce this neurobiological switch in frequency tuning.}},
	Address = {Physics Department, University of Ottawa, Ottawa, Ontario, Canada K1N 6N5. mchacron@physics.uottawa.ca},
	Author = {Chacron, Maurice J. and Doiron, Brent and Maler, Leonard and Longtin, Andre and Bastian, Joseph},
	Citeulike-Article-Id = {935654},
	Citeulike-Linkout-0 = {http://dx.doi.org/10.1038/nature01590},
	Citeulike-Linkout-1 = {http://dx.doi.org/10.1038/nature01590},
	Citeulike-Linkout-2 = {http://view.ncbi.nlm.nih.gov/pubmed/12721628},
	Citeulike-Linkout-3 = {http://www.hubmed.org/display.cgi?uids=12721628},
	Date-Added = {2013-08-30 09:50:23 +0200},
	Date-Modified = {2013-08-30 09:50:23 +0200},
	Day = {1},
	Doi = {10.1038/nature01590},
	Issn = {0028-0836},
	Journal = {Nature},
	Keywords = {motion\_anticipation},
	Month = may,
	Number = {6935},
	Pages = {77--81},
	Pmid = {12721628},
	Posted-At = {2013-07-03 09:20:28},
	Priority = {3},
	Publisher = {Macmillian Magazines Ltd.},
	Title = {Non-classical receptive field mediates switch in a sensory neuron's frequency tuning},
	Url = {http://dx.doi.org/10.1038/nature01590},
	Volume = {423},
	Year = {2003},
	Bdsk-Url-1 = {http://dx.doi.org/10.1038/nature01590}}

@article{Chen05,
	Abstract = {{ We have investigated how the nonclassical receptive field (nCRF) affects dynamic orientation selectivity of cells in the primary visual cortex (V1) in anaesthetized and paralysed cats using the reverse correlation method. We found that tuning to the orientation of the test stimulus depends on the size of the stimulation area. A significant sharpening of orientation tuning was induced by nCRF stimulation, with the magnitude of the effect increasing with the size of stimulation. The effect of the nCRF on the temporal dynamics of orientation tuning was also investigated by examining the tuning over a range of delays from stimulus onset. We found small but detectable changes in both the preferred orientation and the bandwidth of tuning over time when the classical receptive field (CRF) was stimulated alone. Stimulation in nCRF significantly increased the magnitude of these temporal changes. Thus, nCRF stimulation not only enhances the overall orientation selectivity, but also enriches the temporal dynamics of cortical neurones, which may increase the computational power of the visual cortex in information processing. }},
	Author = {Chen, Gang and Dan, Yang and Li, Chao-Yi Y.},
	Citeulike-Article-Id = {137541},
	Citeulike-Linkout-0 = {http://dx.doi.org/10.1113/jphysiol.2004.080051},
	Citeulike-Linkout-1 = {http://jp.physoc.org/cgi/content/abstract/564/1/233},
	Citeulike-Linkout-2 = {http://www.ingentaconnect.com/content/bsc/tjp/2005/00000564/00000001/art00018},
	Citeulike-Linkout-3 = {http://www.ncbi.nlm.nih.gov/pmc/articles/PMC1456041/},
	Citeulike-Linkout-4 = {http://view.ncbi.nlm.nih.gov/pubmed/15677690},
	Citeulike-Linkout-5 = {http://www.hubmed.org/display.cgi?uids=15677690},
	Date-Added = {2013-08-30 09:50:23 +0200},
	Date-Modified = {2013-08-30 09:50:23 +0200},
	Day = {1},
	Doi = {10.1113/jphysiol.2004.080051},
	Issn = {0022-3751},
	Journal = {The Journal of physiology},
	Keywords = {motion\_anticipation},
	Month = apr,
	Number = {Pt 1},
	Pages = {233--243},
	Pmcid = {PMC1456041},
	Pmid = {15677690},
	Posted-At = {2013-07-03 09:18:47},
	Priority = {3},
	Publisher = {Blackwell Publishing},
	Title = {Stimulation of non-classical receptive field enhances orientation selectivity in the cat.},
	Url = {http://dx.doi.org/10.1113/jphysiol.2004.080051},
	Volume = {564},
	Year = {2005},
	Bdsk-Url-1 = {http://dx.doi.org/10.1113/jphysiol.2004.080051}}

@article{Ernst99,
	Abstract = {{In many experiments it has been found that stimuli outside the classical receptive-field of orientation-selective cells in the visual cortex can strongly modulate the response properties of these cells. Typically, stimuli with orientation contrasts lead to enhancement, whereas iso-orientation stimuli lead to suppression of the neuronal activity, but these phenomena in general depend in a complicate manner on various parameters like stimulus configuration, contrast, and geometry. In this contribution, we develop a simple theory for such non-classical receptive-field phenomena. We explain the basic mechanisms by a fixed-point analysis. Within this analysis, center-surround experiments can be described by trajectories in parameter space. This allows for a systematic variation of the coupling and stimulation constants. We show that the strength or sign of the enhancement or suppression should not only vary with the experimental paradigm but also with the position of the cell within the cortex. Our results suggest that non-classical receptive-field phenomena are mediated through orientation-specific lateral excitatory interactions.}},
	Author = {Ernst, Udo and Pawelzik, Klaus and Wolf, Fred and Geisel, Theo},
	Citeulike-Article-Id = {12458486},
	Citeulike-Linkout-0 = {http://dx.doi.org/10.1016/s0925-2312(99)00026-0},
	Date-Added = {2013-08-30 09:50:23 +0200},
	Date-Modified = {2013-08-30 09:50:23 +0200},
	Doi = {10.1016/s0925-2312(99)00026-0},
	Issn = {09252312},
	Journal = {Neurocomputing},
	Keywords = {motion\_anticipation},
	Month = jun,
	Pages = {367--374},
	Posted-At = {2013-07-03 09:15:53},
	Priority = {3},
	Title = {Theory of non-classical receptive field phenomena in the visual cortex},
	Url = {http://dx.doi.org/10.1016/s0925-2312(99)00026-0},
	Volume = {26-27},
	Year = {1999},
	Bdsk-Url-1 = {http://dx.doi.org/10.1016/s0925-2312(99)00026-0}}

license: MIT

license_type: permissive

branch_name: refs/heads/master

extension: bib


text:
require recipes-core/glibc/glibc-package.inc

INHIBIT_DEFAULT_DEPS = "1"
INHIBIT_PACKAGE_STRIP = "1"
INHIBIT_PACKAGE_DEBUG_SPLIT = "1"

# License applies to this recipe code, not the toolchain itself
LICENSE = "MIT"
LIC_FILES_CHKSUM = "\
	file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302 \
	file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420 \
"

PROVIDES += "\
	linux-libc-headers \
	virtual/${TARGET_PREFIX}gcc \
	virtual/${TARGET_PREFIX}g++ \
	virtual/${TARGET_PREFIX}gcc-initial \
	virtual/${TARGET_PREFIX}binutils \
        binutils-cross-${TARGET_ARCH} \
	virtual/${TARGET_PREFIX}libc-for-gcc \
	virtual/${TARGET_PREFIX}compilerlibs \
	virtual/libc \
	virtual/libintl \
	virtual/libiconv \
	virtual/crypt \
        glibc-mtrace \
	glibc-thread-db \
	glibc \
	libc-mtrace \
	gcc-runtime \
	libgcc \
	libg2c \
	libg2c-dev \
	libssp \
	libssp-dev \
	libssp-staticdev \
	libgfortran \
	libgfortran-dev \
	libgfortran-staticdev \
	libmudflap \
	libmudflap-dev \
	libgomp \
	libgomp-dev \
	libgomp-staticdev \
	libitm \
	libitm-dev \
	libitm-staticdev \
	libquadmath \
	libquadmath-dev \
	libquadmath-staticdev \
	virtual/linux-libc-headers \
	libgcov-staticdev \
	virtual/libc-locale \
"

PV = "${EAT_VER_MAIN}"

BINV = "${EAT_VER_GCC}"
TARGET_SYS = "${EAT_TARGET_SYS}"

SRC_URI = "file://SUPPORTED"

do_install() {
	# Add stubs for files OE-core expects
	install -d ${S}/nscd/
	touch  ${S}/nscd/nscd.init
	touch  ${S}/nscd/nscd.conf
	touch  ${S}/nscd/nscd.service
	touch  ${S}/../makedbs.sh

	install -d ${D}${base_libdir}
	install -d ${D}${base_sbindir}
	install -d ${D}${bindir}
	install -d ${D}${sbindir}
	install -d ${D}${libdir}
	install -d ${D}${libexecdir}
	install -d ${D}${datadir}
	install -d ${D}${includedir}
	install -d ${D}/include
	install -d ${D}${libdir}/${EAT_TARGET_SYS}/${EAT_VER_GCC}
	install -d ${D}${libdir}/gcc/${EAT_TARGET_SYS}/${EAT_VER_GCC}

	CP_ARGS="-Prf --preserve=mode,timestamps --no-preserve=ownership"
	cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/${EAT_LIBDIR}/*  ${D}${base_libdir}
	if [ -d ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/libc/${EAT_LIBDIR}/${EAT_TARGET_SYS} ]; then
		cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/libc/${EAT_LIBDIR}/${EAT_TARGET_SYS}/*  ${D}${base_libdir}
	else
		if [ -f ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/libc/${EAT_LIBDIR}/ld-${EAT_VER_LIBC}.so ]; then
			cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/libc/${EAT_LIBDIR}/*  ${D}${base_libdir}
		else
			cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/libc/usr/${EAT_LIBDIR}/*.so*  ${D}${base_libdir}
		fi
	fi
	if [ -d ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/libc/usr/${EAT_LIBDIR}/${EAT_TARGET_SYS} ]; then
		cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/libc/usr/${EAT_LIBDIR}/${EAT_TARGET_SYS}/*  ${D}${libdir}
	else
		cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/libc/usr/${EAT_LIBDIR}/*  ${D}${libdir}
		if [ ! -f ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/libc/${EAT_LIBDIR}/ld-${EAT_VER_LIBC}.so ]; then
			rm -rf ${D}${libdir}/*.so*
		fi
	fi
	cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/libc/usr/share/*  ${D}${datadir}
	cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/libc/usr/include/*  ${D}${includedir}
	if [ -d ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/libc/usr/include/${EAT_TARGET_SYS} ]; then
		cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/libc/usr/include/${EAT_TARGET_SYS}/*  ${D}${includedir}
		rm -r ${D}${includedir}/${EAT_TARGET_SYS}
	fi

	cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/include/* ${D}${includedir}
	ln -sf ../usr/include/c++ ${D}/include/c++

	cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/libc/usr/bin/* ${D}${bindir}
	cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/libc/usr/sbin/* ${D}${sbindir}
	cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/libc/sbin/* ${D}${base_sbindir}
	rm -rf ${D}${bindir}/gdbserver
	sed -i -e 's#/arm/tools/gnu/bash/4.2/rhe6-x86_64##' ${D}${bindir}/tzselect
	sed -i -e 's#/arm/tools/gnu/bash/4.2/rhe6-x86_64##' ${D}${bindir}/ldd

	cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/lib/gcc/${EAT_TARGET_SYS}/${EAT_VER_GCC}/crt*.o ${D}${libdir}/${EAT_TARGET_SYS}/${EAT_VER_GCC}/

	cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/lib/gcc/${EAT_TARGET_SYS}/${EAT_VER_GCC}/libgcov* ${D}${libdir}/gcc/${EAT_TARGET_SYS}/${EAT_VER_GCC}/
	cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/lib/gcc/${EAT_TARGET_SYS}/${EAT_VER_GCC}/include ${D}${libdir}/gcc/${EAT_TARGET_SYS}/${EAT_VER_GCC}/
	cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/lib/gcc/${EAT_TARGET_SYS}/${EAT_VER_GCC}/finclude ${D}${libdir}/gcc/${EAT_TARGET_SYS}/${EAT_VER_GCC}/

	# fix up the copied symlinks (they are still pointing to the multiarch directory)
	linker_name="${@bb.utils.contains("TUNE_FEATURES", "aarch64", "ld-linux-aarch64.so.1", bb.utils.contains("TUNE_FEATURES", "callconvention-hard", "ld-linux-armhf.so.3", "ld-linux.so.3",d), d)}"
	ln -sf ld-${EAT_VER_LIBC}.so ${D}${base_libdir}/${linker_name}
	ln -sf ../../lib/librt.so.1 ${D}${libdir}/librt.so
	ln -sf ../../lib/libcrypt.so.1 ${D}${libdir}/libcrypt.so
	ln -sf ../../lib/libresolv.so.2 ${D}${libdir}/libresolv.so
	ln -sf ../../lib/libnss_hesiod.so.2 ${D}${libdir}/libnss_hesiod.so
	ln -sf ../../lib/libutil.so.1 ${D}${libdir}/libutil.so
	ln -sf ../../lib/libBrokenLocale.so.1 ${D}${libdir}/libBrokenLocale.so
	ln -sf ../../lib/libpthread.so.0 ${D}${libdir}/libpthread.so
	ln -sf ../../lib/libthread_db.so.1 ${D}${libdir}/libthread_db.so
	ln -sf ../../lib/libanl.so.1 ${D}${libdir}/libanl.so
	ln -sf ../../lib/libdl.so.2 ${D}${libdir}/libdl.so
	ln -sf ../../lib/libnss_db.so.2 ${D}${libdir}/libnss_db.so
	ln -sf ../../lib/libnss_dns.so.2 ${D}${libdir}/libnss_dns.so
	ln -sf ../../lib/libnss_files.so.2 ${D}${libdir}/libnss_files.so
	ln -sf ../../lib/libnss_compat.so.2 ${D}${libdir}/libnss_compat.so
	ln -sf ../../lib/libm.so.6 ${D}${libdir}/libm.so

	# remove potential .so duplicates from base_libdir
	# for all symlinks created above in libdir
	rm -f ${D}${base_libdir}/librt.so
	rm -f ${D}${base_libdir}/libcrypt.so
	rm -f ${D}${base_libdir}/libresolv.so
	rm -f ${D}${base_libdir}/libnss_hesiod.so
	rm -f ${D}${base_libdir}/libutil.so
	rm -f ${D}${base_libdir}/libBrokenLocale.so
	rm -f ${D}${base_libdir}/libpthread.so
	rm -f ${D}${base_libdir}/libthread_db.so
	rm -f ${D}${base_libdir}/libanl.so
	rm -f ${D}${base_libdir}/libdl.so
	rm -f ${D}${base_libdir}/libnss_db.so
	rm -f ${D}${base_libdir}/libnss_dns.so
	rm -f ${D}${base_libdir}/libnss_files.so
	rm -f ${D}${base_libdir}/libnss_compat.so
	rm -f ${D}${base_libdir}/libm.so

	# Move these completely to ${libdir} and delete duplicates in ${base_libdir}
	for lib in asan atomic gfortran gomp itm lsan sanitizer stdc++ tsan ubsan; do
		if [ -e ${D}${base_libdir}/lib${lib}.spec ] ; then
			mv ${D}${base_libdir}/lib${lib}.spec ${D}${libdir}
		fi
		if [ -e ${D}${base_libdir}/lib${lib}.a ] ; then
			mv ${D}${base_libdir}/lib${lib}.a ${D}${libdir}
		fi
		rm -f ${D}${base_libdir}/lib${lib}*
	done

	# Clean up duplicate libs that are both in base_libdir and libdir
	rm -f ${D}${libdir}/libgcc*

	# Besides ld-${EAT_VER_LIBC}.so, other libs can have duplicates like lib*-${EAT_VER_LIBC}.so
	# Only remove them if both are regular files and are identical
	for i in ${D}${base_libdir}/lib*-${EAT_VER_LIBC}.so; do
		f=$(echo $i | sed 's/-${EAT_VER_LIBC}//')
		l=$(ls $f.*)
		if [ $(readlink -f $i ) = $l ]; then
			echo "$i is a symlink of $l, keep it"
		elif [ $(readlink -f $l ) = $i ]; then
			echo "$l is a symlink of $i, keep it"
		else
			cmp -s $i $l
			if [ $? -eq 0 ]; then
				echo "$i is a duplicate of $l, remove it"
				rm $i
			else
				echo "$i and $l are different files, keep them both"
			fi
		fi
	done

	if [ -d ${D}${base_libdir}/arm-linux-gnueabi ]; then
	   rm -rf ${D}${base_libdir}/arm-linux-gnueabi
	fi

	if [ -d ${D}${base_libdir}/ldscripts ]; then
	   rm -rf ${D}${base_libdir}/ldscripts
	fi

	# Provided by libnsl2
	rm -rf ${D}${includedir}/rpcsvc/yppasswd.*
	# Provided by quota
	rm -rf ${D}${includedir}/rpcsvc/rquota.*

	if [ -f ${D}${libdir}/libc.so ];then
		sed -i -e "s# /${EAT_LIBDIR}/${EAT_TARGET_SYS}# ../../${EAT_LIBDIR}#g" -e "s# /usr/${EAT_LIBDIR}/# /usr/lib/#g" -e "s# /usr/${EAT_LIBDIR}/${EAT_TARGET_SYS}# .#g" -e "s# /${EAT_LIBDIR}/ld-linux# ../../${EAT_LIBDIR}/ld-linux#g" ${D}${libdir}/libc.so
		sed -i -e "s# /${EAT_LIBDIR}/libc.so.6# /lib/libc.so.6#g" ${D}${libdir}/libc.so
		sed -i -e "s# /lib# ../../lib#g" -e "s# /usr/lib# .#g" ${D}${libdir}/libc.so
	fi

	if [ -f ${D}${base_libdir}/libc.so ];then
		sed -i -e "s# /${EAT_LIBDIR}/${EAT_TARGET_SYS}# ../../lib#g" -e "s# /usr/${EAT_LIBDIR}/${EAT_TARGET_SYS}# .#g" "s# /${EAT_LIBDIR}/# /lib/#g" ${D}${base_libdir}/libc.so
		if [ -f ${D}${base_libdir}/libc.so.6 ]; then
			sed -i -e "s# /usr/${EAT_LIBDIR}/libc.so.6# /lib/libc.so.6#g" "s# /${EAT_LIBDIR}/libc.so.6# /lib/libc.so.6#g" ${D}${base_libdir}/libc.so.6
		fi
	fi

	# Remove if empty
	rmdir ${D}${bindir} || true
	rmdir ${D}${sbindir} || true
	rmdir ${D}${base_sbindir} || true
}

# External toolchain doesn't provide multilib support so make corresponding
# install API as an empty API to avoid an unnecessary errors.
oe_multilib_header () {
	return
}

PACKAGES_DYNAMIC = "^locale-base-.* \
                    ^glibc-gconv-.* ^glibc-charmap-.* ^glibc-localedata-.* ^glibc-binary-localedata-.* \
                    ^${MLPREFIX}glibc-gconv$"

# PACKAGES is split up according to the 'source' recipes/includes in OE-core
# Stylistic differences are kept to make copy/pasting easier.

# From gcc-runtime.inc

PACKAGES += "\
    gcc-runtime-dbg \
    libstdc++ \
    libstdc++-precompile-dev \
    libstdc++-dev \
    libstdc++-staticdev \
    libg2c \
    libg2c-dev \
    libssp \
    libssp-dev \
    libssp-staticdev \
    libmudflap \
    libmudflap-dev \
    libmudflap-staticdev \
    libquadmath \
    libquadmath-dev \
    libquadmath-staticdev \
    libgomp \
    libgomp-dev \
    libgomp-staticdev \
    libatomic \
    libatomic-dev \
    libatomic-staticdev \
    libitm \
    libitm-dev \
    libitm-staticdev \
"

# From gcc-sanitizers.inc

PACKAGES += "gcc-sanitizers gcc-sanitizers-dbg"
PACKAGES += "libasan libubsan liblsan libtsan"
PACKAGES += "libasan-dev libubsan-dev liblsan-dev libtsan-dev"
PACKAGES += "libasan-staticdev libubsan-staticdev liblsan-staticdev libtsan-staticdev"

# From libgfortran.inc:

PACKAGES += "\
    libgfortran-dbg \
    libgfortran \
    libgfortran-dev \
    libgfortran-staticdev \
"

# libgcc.inc uses ${PN}, so replace that

PACKAGES += "\
    libgcc \
    libgcc-dev \
    libgcc-dbg \
"

# ... and the leftovers

PACKAGES =+ "\
        ${PN}-mtrace \
	libgcov-staticdev \
	linux-libc-headers \
	linux-libc-headers-dev \
"

INSANE_SKIP_${PN}-dbg = "staticdev"
INSANE_SKIP_${PN}-utils += "ldflags"
INSANE_SKIP_libstdc++ += "ldflags"
INSANE_SKIP_libgfortran += "ldflags"
INSANE_SKIP_libgcc += "ldflags dev-deps"
INSANE_SKIP_libgfortran += "ldflags dev-deps"
INSANE_SKIP_libstdc++ += "ldflags dev-deps"
INSANE_SKIP_libatomic += "ldflags"
INSANE_SKIP_libasan += "ldflags"
INSANE_SKIP_libubsan += "ldflags"
INSANE_SKIP_libssp += "ldflags"
INSANE_SKIP_libgomp += "ldflags"
INSANE_SKIP_libitm += "ldflags"
INSANE_SKIP_gdbserver += "ldflags"

# OE-core has literally listed 'glibc' in LIBC_DEPENDENCIES :/
RPROVIDES_${PN} = "glibc rtld(GNU_HASH)"
# Add runtime provides for the other libc* packages as well
RPROVIDES_${PN}-dev = "glibc-dev"
RPROVIDES_${PN}-doc = "glibc-doc"
RPROVIDES_${PN}-dbg = "glibc-dbg"
RPROVIDES_${PN}-pic = "glibc-pic"
RPROVIDES_${PN}-utils = "glibc-utils"
RPROVIDES_${PN}-mtrace = "glibc-mtrace libc-mtrace"

PKG_${PN} = "glibc"
PKG_${PN}-dev = "glibc-dev"
PKG_${PN}-doc = "glibc-doc"
PKG_${PN}-dbg = "glibc-dbg"
PKG_${PN}-pic = "glibc-pic"
PKG_${PN}-utils = "glibc-utils"
PKG_${PN}-mtrace = "glibc-mtrace"
PKG_${PN}-gconv = "glibc-gconv"
PKG_${PN}-extra-nss = "glibc-extra-nss"
PKG_${PN}-thread-db = "glibc-thread-db"
PKG_${PN}-pcprofile = "glibc-pcprofile"
PKG_${PN}-staticdev = "glibc-staticdev"

PKGV = "${EAT_VER_LIBC}"
PKGV_${PN} = "${EAT_VER_LIBC}"
PKGV_${PN}-dev = "${EAT_VER_LIBC}"
PKGV_${PN}-doc = "${EAT_VER_LIBC}"
PKGV_${PN}-dbg = "${EAT_VER_LIBC}"
PKGV_${PN}-pic = "${EAT_VER_LIBC}"
PKGV_${PN}-utils = "${EAT_VER_LIBC}"
PKGV_${PN}-mtrace = "${EAT_VER_LIBC}"
PKGV_${PN}-gconv = "${EAT_VER_LIBC}"
PKGV_${PN}-extra-nss = "${EAT_VER_LIBC}"
PKGV_${PN}-thread-db = "${EAT_VER_LIBC}"
PKGV_${PN}-pcprofile = "${EAT_VER_LIBC}"
PKGV_${PN}-staticdev = "${EAT_VER_LIBC}"
PKGV_catchsegv = "${EAT_VER_LIBC}"
PKGV_glibc-extra-nss = "${EAT_VER_LIBC}"
PKGV_glibc-thread-db = "${EAT_VER_LIBC}"

PKGV_libmemusage = "${EAT_VER_LIBC}"
PKGV_libsegfault = "${EAT_VER_LIBC}"
PKGV_libsotruss = "${EAT_VER_LIBC}"
PKGV_sln = "${EAT_VER_LIBC}"
PKGV_nscd = "${EAT_VER_LIBC}"
PKGV_ldd = "${EAT_VER_LIBC}"

PKGV_libasan-dev = "${EAT_VER_GCC}"
PKGV_libasan = "${EAT_VER_GCC}"
PKGV_libasan-staticdev = "${EAT_VER_GCC}"
PKGV_libatomic-dev = "${EAT_VER_GCC}"
PKGV_libatomic = "${EAT_VER_GCC}"
PKGV_libatomic-staticdev = "${EAT_VER_GCC}"
PKGV_libg2c-dev = "${EAT_VER_GCC}"
PKGV_libg2c = "${EAT_VER_GCC}"
PKGV_libgcc-dev = "${EAT_VER_GCC}"
PKGV_libgcc = "${EAT_VER_GCC}"
PKGV_libgfortran-dbg = "${EAT_VER_GCC}"
PKGV_libgfortran-dev = "${EAT_VER_GCC}"
PKGV_libgfortran = "${EAT_VER_GCC}"
PKGV_libgfortran-staticdev = "${EAT_VER_GCC}"
PKGV_libgomp-dev = "${EAT_VER_GCC}"
PKGV_libgomp = "${EAT_VER_GCC}"
PKGV_libgomp-staticdev = "${EAT_VER_GCC}"
PKGV_libitm-dev = "${EAT_VER_GCC}"
PKGV_libitm = "${EAT_VER_GCC}"
PKGV_libitm-staticdev = "${EAT_VER_GCC}"
PKGV_liblsan-dev = "${EAT_VER_GCC}"
PKGV_liblsan = "${EAT_VER_GCC}"
PKGV_liblsan-staticdev = "${EAT_VER_GCC}"
PKGV_libmudflap-dev = "${EAT_VER_GCC}"
PKGV_libmudflap = "${EAT_VER_GCC}"
PKGV_libmudflap-staticdev = "${EAT_VER_GCC}"
PKGV_libquadmath-dev = "${EAT_VER_GCC}"
PKGV_libquadmath = "${EAT_VER_GCC}"
PKGV_libquadmath-staticdev = "${EAT_VER_GCC}"
PKGV_libssp-dev = "${EAT_VER_GCC}"
PKGV_libssp = "${EAT_VER_GCC}"
PKGV_libssp-staticdev = "${EAT_VER_GCC}"
PKGV_libstdc++-dbg = "${EAT_VER_GCC}"
PKGV_libstdc++-dev = "${EAT_VER_GCC}"
PKGV_libstdc++ = "${EAT_VER_GCC}"
PKGV_libstdc++-precompile-dev = "${EAT_VER_GCC}"
PKGV_libstdc++-staticdev = "${EAT_VER_GCC}"
PKGV_libtsan-dev = "${EAT_VER_GCC}"
PKGV_libtsan = "${EAT_VER_GCC}"
PKGV_libtsan-staticdev = "${EAT_VER_GCC}"
PKGV_libubsan-dev = "${EAT_VER_GCC}"
PKGV_libubsan = "${EAT_VER_GCC}"
PKGV_libubsan-staticdev = "${EAT_VER_GCC}"

PKGV_linux-libc-headers-dev = "${EAT_VER_KERNEL}"
PKGV_linux-libc-headers = "${EAT_VER_KERNEL}"

PKGV_gdbserver = "${EAT_VER_GDBSERVER}"

ALLOW_EMPTY_${PN}-mtrace = "1"
FILES_${PN}-mtrace = "${bindir}/mtrace"

FILES_libgcov-staticdev = "${libdir}/gcc/${TARGET_SYS}/${BINV}/libgcov.a"

FILES_libsegfault = "${base_libdir}/libSegFault*"

FILES_catchsegv = "${bindir}/catchsegv"
RDEPENDS_catchsegv = "libsegfault"

RDEPENDS_ldd = "bash"
RDEPENDS_tzcode = "bash"

# From libgfortran.inc:

FILES_libgfortran = "${libdir}/libgfortran.so.*"
FILES_libgfortran-dev = "\
    ${libdir}/libgfortran*.so \
    ${libdir}/libgfortran.spec \
    ${libdir}/libgfortran.la \
    ${libdir}/gcc/${TARGET_SYS}/${BINV}/libgfortranbegin.* \
    ${libdir}/gcc/${TARGET_SYS}/${BINV}/libcaf_single* \
    ${libdir}/gcc/${TARGET_SYS}/${BINV}/finclude/ \
"
FILES_libgfortran-staticdev = "${libdir}/libgfortran.a"

# From gcc-sanitizers.inc:

FILES_libasan += "${libdir}/libasan.so.*"
FILES_libasan-dev += "\
    ${libdir}/libasan_preinit.o \
    ${libdir}/libasan.so \
    ${libdir}/libasan.la \
"
FILES_libasan-staticdev += "${libdir}/libasan.a"

FILES_libubsan += "${libdir}/libubsan.so.*"
FILES_libubsan-dev += "\
    ${libdir}/libubsan.so \
    ${libdir}/libubsan.la \
"
FILES_libubsan-staticdev += "${libdir}/libubsan.a"

FILES_liblsan += "${libdir}/liblsan.so.*"
FILES_liblsan-dev += "\
    ${libdir}/liblsan.so \
    ${libdir}/liblsan.la \
    ${libdir}/liblsan_preinit.o \
"
FILES_liblsan-staticdev += "${libdir}/liblsan.a"

FILES_libtsan += "${libdir}/libtsan.so.*"
FILES_libtsan-dev += "\
    ${libdir}/libtsan.so \
    ${libdir}/libtsan.la \
    ${libdir}/libtsan_*.o \
"
FILES_libtsan-staticdev += "${libdir}/libtsan.a"

FILES_gcc-sanitizers = "${libdir}/*.spec ${libdir}/gcc/${TARGET_SYS}/${BINV}/include/sanitizer/*.h"

# From libgcc.inc:

FILES_libgcc = "${base_libdir}/libgcc_s.so.1"

FILES_libgcc-dev = "\
    ${base_libdir}/libgcc*.so \
    ${@oe.utils.conditional('BASETARGET_SYS', '${TARGET_SYS}', '', '${libdir}/${BASETARGET_SYS}', d)} \
    ${libdir}/${TARGET_SYS}/${BINV}* \
    ${libdir}/${TARGET_ARCH}${TARGET_VENDOR}* \
    ${libdir}/gcc/${TARGET_SYS}/${BINV}/include \
"

FILES_linux-libc-headers = ""
FILES_linux-libc-headers-dev = "\
	${includedir}/asm* \
	${includedir}/linux \
	${includedir}/mtd \
	${includedir}/rdma \
	${includedir}/scsi \
	${includedir}/sound \
	${includedir}/video \
"
FILES_${PN} += "\
	${libdir}/bin \
	${libdir}/locale \
	${libdir}/gconv/gconv-modules \
	${datadir}/zoneinfo \
	${base_libdir}/libcrypt*.so.* \
	${base_libdir}/libcrypt-*.so \
	${base_libdir}/libc.so.* \
	${base_libdir}/libc-*.so \
	${base_libdir}/libm.so.* \
	${base_libdir}/libmemusage.so \
	${base_libdir}/libm-*.so \
	${base_libdir}/ld*.so.* \
	${base_libdir}/ld-*.so \
	${base_libdir}/libpthread*.so.* \
	${base_libdir}/libpthread*.so \
	${base_libdir}/libpthread-*.so \
	${base_libdir}/libresolv*.so.* \
	${base_libdir}/libresolv-*.so \
	${base_libdir}/librt*.so.* \
	${base_libdir}/librt-*.so \
	${base_libdir}/libutil*.so.* \
	${base_libdir}/libutil-*.so \
	${base_libdir}/libnss_files*.so.* \
	${base_libdir}/libnss_files-*.so \
	${base_libdir}/libnss_compat*.so.* \
	${base_libdir}/libnss_compat-*.so \
	${base_libdir}/libnss_dns*.so.* \
	${base_libdir}/libnss_dns-*.so \
	${base_libdir}/libnss_nis*.so.* \
	${base_libdir}/libnss_nisplus-*.so \
	${base_libdir}/libnss_nisplus*.so.* \
	${base_libdir}/libnss_nis-*.so \
	${base_libdir}/libnss_hesiod*.so.* \
	${base_libdir}/libnss_hesiod-*.so \
	${base_libdir}/libdl*.so.* \
	${base_libdir}/libdl-*.so \
	${base_libdir}/libanl*.so.* \
	${base_libdir}/libanl-*.so \
	${base_libdir}/libBrokenLocale*.so.* \
	${base_libdir}/libBrokenLocale-*.so \
	${base_libdir}/libthread_db*.so.* \
	${base_libdir}/libthread_db-*.so \
	${base_libdir}/libmemusage.so \
	${base_libdir}/libSegFault.so \
	${base_libdir}/libpcprofile.so \
    "

FILES_${PN}-dbg += "${base_libdir}/debug"

# From gcc-runtime.inc

# include python debugging scripts
FILES_gcc-runtime-dbg += "\
    ${libdir}/libstdc++.so.*-gdb.py \
    ${datadir}/gcc-${BINV}/python/libstdcxx \
"

FILES_libg2c = "${target_libdir}/libg2c.so.*"
SUMMARY_libg2c = "Companion runtime library for g77"
FILES_libg2c-dev = "\
    ${libdir}/libg2c.so \
    ${libdir}/libg2c.a \
    ${libdir}/libfrtbegin.a \
"
SUMMARY_libg2c-dev = "Companion runtime library for g77 - development files"

FILES_libstdc++ = "${libdir}/libstdc++.so.*"
SUMMARY_libstdc++ = "GNU standard C++ library"
FILES_libstdc++-dev = "\
    /include/c++ \
    ${includedir}/c++/ \
    ${libdir}/libstdc++.so \
    ${libdir}/libstdc++*.la \
    ${libdir}/libsupc++.la \
"
SUMMARY_libstdc++-dev = "GNU standard C++ library - development files"

FILES_libstdc++-staticdev = "\
    ${libdir}/libstdc++*.a \
    ${libdir}/libsupc++.a \
"
SUMMARY_libstdc++-staticdev = "GNU standard C++ library - static development files"

FILES_libstdc++-precompile-dev = "${includedir}/c++/${TARGET_SYS}/bits/*.gch"
SUMMARY_libstdc++-precompile-dev = "GNU standard C++ library - precompiled header files"

FILES_libssp = "${libdir}/libssp.so.*"
SUMMARY_libssp = "GNU stack smashing protection library"
FILES_libssp-dev = "\
    ${libdir}/libssp*.so \
    ${libdir}/libssp*_nonshared.a \
    ${libdir}/libssp*.la \
    ${libdir}/gcc/${TARGET_SYS}/${BINV}/include/ssp \
"
SUMMARY_libssp-dev = "GNU stack smashing protection library - development files"
FILES_libssp-staticdev = "${libdir}/libssp*.a"
SUMMARY_libssp-staticdev = "GNU stack smashing protection library - static development files"

FILES_libquadmath = "${libdir}/libquadmath*.so.*"
SUMMARY_libquadmath = "GNU quad-precision math library"
FILES_libquadmath-dev = "\
    ${libdir}/gcc/${TARGET_SYS}/${BINV}/include/quadmath* \
    ${libdir}/libquadmath*.so \
    ${libdir}/libquadmath.la \
"
SUMMARY_libquadmath-dev = "GNU quad-precision math library - development files"
FILES_libquadmath-staticdev = "${libdir}/libquadmath.a"
SUMMARY_libquadmath-staticdev = "GNU quad-precision math library - static development files"

# NOTE: mudflap has been removed as of gcc 4.9 and has been superseded by the address sanitiser
FILES_libmudflap = "${libdir}/libmudflap*.so.*"
SUMMARY_libmudflap = "Pointer debugging library for gcc"
FILES_libmudflap-dev = "\
    ${libdir}/libmudflap*.so \
    ${libdir}/libmudflap.la \
"
SUMMARY_libmudflap-dev = "Pointer debugging library for gcc - development files"
FILES_libmudflap-staticdev = "${libdir}/libmudflap.a"
SUMMARY_libmudflap-staticdev = "Pointer debugging library for gcc - static development files"

FILES_libgomp = "${libdir}/libgomp*${SOLIBS}"
SUMMARY_libgomp = "GNU OpenMP parallel programming library"
FILES_libgomp-dev = "\
    ${libdir}/libgomp*${SOLIBSDEV} \
    ${libdir}/libgomp*.la \
    ${libdir}/libgomp.spec \
    ${libdir}/gcc/${TARGET_SYS}/${BINV}/include/omp.h \
    ${libdir}/gcc/${TARGET_SYS}/${BINV}/include/openacc.h \
"
SUMMARY_libgomp-dev = "GNU OpenMP parallel programming library - development files"
FILES_libgomp-staticdev = "${libdir}/libgomp*.a"
SUMMARY_libgomp-staticdev = "GNU OpenMP parallel programming library - static development files"

FILES_libatomic = "${libdir}/libatomic.so.*"
SUMMARY_libatomic = "GNU C++11 atomics support library"
FILES_libatomic-dev = "\
    ${libdir}/libatomic.so \
    ${libdir}/libatomic.la \
"
SUMMARY_libatomic-dev = "GNU C++11 atomics support library - development files"
FILES_libatomic-staticdev = "${libdir}/libatomic.a"
SUMMARY_libatomic-staticdev = "GNU C++11 atomics support library - static development files"

FILES_libitm = "${libdir}/libitm.so.*"
SUMMARY_libitm = "GNU transactional memory support library"
FILES_libitm-dev = "\
    ${libdir}/libitm.so \
    ${libdir}/libitm.la \
    ${libdir}/libitm.spec \
"
SUMMARY_libitm-dev = "GNU transactional memory support library - development files"
FILES_libitm-staticdev = "${libdir}/libitm.a"
SUMMARY_libitm-staticdev = "GNU transactional memory support library - static development files"

EAT_VER_MAIN ??= ""

python () {
    if not d.getVar("EAT_VER_MAIN", False):
        raise bb.parse.SkipPackage("External ARM toolchain not configured (EAT_VER_MAIN not set).")
    import re
    notglibc = (re.match('.*uclibc$', d.getVar('TARGET_OS', True)) != None) or (re.match('.*musl$', d.getVar('TARGET_OS', True)) != None)
    if notglibc:
        raise bb.parse.SkipPackage("incompatible with target %s" %
                                   d.getVar('TARGET_OS', True))
}

extension: bb


text:
package emotion

import "testing"

func TestEmotion(t *testing.T) {
	cases := []struct {
		in  string
		emo int
	}{
		{"anger", int(Anger)},
		{"love", int(Joy)},
	}

	for _, c := range cases {
		emo := EmotionsIntFor(c.in)
		if emo != c.emo {
			t.Errorf("EmotionFor(%q) == %q, want %q", c.in, emo, c.emo)
		}
	}
}

func TestAttitude(t *testing.T) {
	cases := []struct {
		in  string
		attitude Attitude
	}{
		{"anger", Negative},
		{"love", Positive},
	}

	for _, c := range cases {
		attitude := AttitudeFor(c.in)
		if attitude != c.attitude {
			t.Errorf("AttitudeFor(%q) == %q, want %q", c.in, attitude, c.attitude)
		}
	}
}

extension: go


text:
% Encoding: UTF-8
@inproceedings{kabbani2014specification,
  title={Specification and enforcement of dynamic authorization policies oriented by situations},
  author={Kabbani, Bashar and others},
  booktitle={New Technologies, Mobility and Security (NTMS)},
  pages={1--6},
  year={2014},
  organization={IEEE}
}
@inproceedings{medvet2015evolutionary,
  title={Evolutionary inference of attribute-based access control policies},
  author={Medvet, Eric and Bartoli, Alberto and Carminati, Barbara and Ferrari, Elena},
  booktitle={International Conference on Evolutionary Multi-Criterion Optimization},
  pages={351--365},
  year={2015},
  organization={Springer}
}
@article{ardagna2010access,
  title={Access control for smarter healthcare using policy spaces},
  author={Ardagna, Claudio A and Di Vimercati, Sabrina De Capitani and Foresti, Sara and Grandison, Tyrone W and Jajodia, Sushil and Samarati, Pierangela},
  journal={Computers \& Security},
  volume={29},
  number={8},
  pages={848--858},
  year={2010},
  publisher={Elsevier}
}
@inproceedings{balasubramaniam2013white,
  title={A white-box policy analysis and its efficient implementation},
  author={Balasubramaniam, Jayalakshmi and Fong, Philip WL},
  booktitle={Proceedings of the 18th ACM symposium on Access control models and technologies},
  pages={149--160},
  year={2013},
  organization={ACM}
}
@inproceedings{ruj2011distributed,
  title={Distributed fine-grained access control in wireless sensor networks},
  author={Ruj, Sushmita and Nayak, Amiya and Stojmenovic, Ivan},
  booktitle={Parallel \& Distributed Processing Symposium (IPDPS)},
  pages={352--362},
  year={2011},
  organization={IEEE}
}
@article{ferreira2013log,
  title={Log analysis of human computer interactions regarding Break The Glass accesses to genetic reports},
  author={Ferreira, Ana},
  year={2013}
}
@incollection{petritsch2014generic,
  title={A generic break-glass model},
  author={Petritsch, Helmut},
  booktitle={Break-Glass},
  pages={37--50},
  year={2014},
  publisher={Springer}
}
@inproceedings{rostad2006study,
  title={A study of access control requirements for healthcare systems based on audit trails from access logs},
  author={Rostad, Lillian and Edsberg, Ole},
  booktitle={Computer Security Applications Conference, 2006. ACSAC'06. 22nd Annual},
  pages={175--186},
  year={2006},
  organization={IEEE}
}
@article{liu2017btg,
  title={BTG-BIBA: A Flexibility-Enhanced Biba Model Using BTG Strategies for Operating System},
  author={Liu, Gang and Wang, Can and Zhang, Runnan and Wang, Quan and Song, Huimin and Ji, Shaomin},
  journal={World Academy of Science, Engineering and Technology, International Journal of Computer, Electrical, Automation, Control and Information Engineering},
  volume={11},
  number={6},
  pages={766--772},
  year={2017}
}
@inproceedings{thi2017using,
  title={Using JSON to Specify Privacy Preserving-Enabled Attribute-Based Access Control Policies},
  author={Nguyet, Thi Que Tran and others},
  booktitle={International Conference on Security, Privacy and Anonymity in Computation, Communication and Storage},
  pages={561--570},
  year={2017},
  organization={Springer}
}
@inproceedings{georgiadis2001flexible,
  title={Flexible team-based access control using contexts},
  author={Georgiadis, Christos K and Mavridis, Ioannis and Pangalos, George and Thomas, Roshan K},
  booktitle={Proceedings of the sixth ACM symposium on Access control models and technologies},
  pages={21--27},
  year={2001},
  organization={ACM}
}
@inproceedings{dunlop2001dynamic,
  title={Dynamic policy model for large evolving enterprises},
  author={Dunlop, Nicole and Indulska, Jadwiga and Raymond, Kerry},
  booktitle={Enterprise Distributed Object Computing Conference},
  pages={193--197},
  year={2001},
  organization={IEEE}
}
@article{rissanen2013extensible,
  title={extensible access control markup language (xacml) version 3.0},
  author={Rissanen, Erik and others},
  journal={OASIS standard},
  volume={22},
  year={2013}
}
@article{turkmen2017formal,
  title={Formal analysis of XACML policies using SMT},
  author={Turkmen, Fatih and den Hartog, Jerry and Ranise, Silvio and Zannone, Nicola},
  journal={Computers \& Security},
  volume={66},
  pages={185--203},
  year={2017},
  publisher={Elsevier}
}
@inproceedings{son2017rew,
  title={REW-SMT: A New Approach for Rewriting XACML Request with Dynamic Big Data Security Policies},
  author={Son, Ha Xuan and Dang, Tran Khanh and Massacci, Fabio},
  booktitle={International Conference on Security, Privacy and Anonymity in Computation, Communication and Storage},
  pages={501--515},
  year={2017},
  organization={Springer}
}
@inproceedings{son2016rew,
  title={Rew-XAC: an approach to rewriting request for elastic ABAC enforcement with dynamic policies},
  author={Son, Ha Xuan and Tran, Luong Khiem and Dang, Tran Khanh and Pham, Yen Nhi},
  booktitle={Advanced Computing and Applications (ACOMP)},
  pages={25--31},
  year={2016},
  organization={IEEE}
}
@article{gope2016novel,
  title={A novel reference security model with the situation based access policy for accessing ephr data},
  author={Gope, Prosanta and Amin, Ruhul},
  journal={Journal of medical systems},
  volume={40},
  number={11},
  pages={242},
  year={2016},
  publisher={Springer}
}
@article{zhang2014role,
  title={Role-based and time-bound access and management of EHR data},
  author={Zhang, Rui and Liu, Ling and Xue, Rui},
  journal={Security and Communication Networks},
  volume={7},
  number={6},
  pages={994--1015},
  year={2014},
  publisher={Wiley Online Library}
}
@inproceedings{farinha2010legislation,
  title={From Legislation to Practice-A Case Study of Break the Glass in Healthcare.},
  author={Farinha, Pedro and Correia, Ricardo Jo{\~a}o Cruz and Antunes, Luis Filipe Coelho and Almeida, Filipe and Ferreira, Ana Margarida},
  booktitle={HEALTHINF},
  pages={114--120},
  year={2010}
}
@inproceedings{ferreira2006break,
  title={How to break access control in a controlled manner},
  author={Ferreira, Anna and Cruz-Correia, Ricardo and Antunes, Luis and Farinha, Pedro and Oliveira-Palhares, E and Chadwick, David W and Costa-Pereira, Altamiro},
  booktitle={Computer-Based Medical Systems, 2006. CBMS 2006. 19th IEEE International Symposium on},
  pages={847--854},
  year={2006},
  organization={IEEE}
}
@inproceedings{rissanen2004towards,
  title={Towards a mechanism for discretionary overriding of access control},
  author={Rissanen, Erik and Firozabadi, Babak Sadighi and Sergot, Marek},
  booktitle={International Workshop on Security Protocols},
  pages={312--319},
  year={2004},
  organization={Springer}
}
@inproceedings{povey1999optimistic,
  title={Optimistic security: a new access control paradigm},
  author={Povey, Dean},
  booktitle={Proceedings of the 1999 workshop on New security paradigms},
  pages={40--45},
  year={1999},
  organization={ACM}
}
@article{joint2004cocir,
  title={COCIR/JIRA Security And Privacy Committee (SPC)},
  author={Joint, NEMA},
  journal={Break-glass: An approach to granting emergency access to healthcare systems},
  year={2004}
}
@inproceedings{maw2014evaluation,
  title={An evaluation of break-the-glass access control model for medical data in wireless sensor networks},
  author={Maw, Htoo Aung and Xiao, Hannan and Christianson, Bruce and Malcolm, James A},
  booktitle={e-Health Networking, Applications and Services (Healthcom), 2014 IEEE 16th International Conference on},
  pages={130--135},
  year={2014},
  organization={IEEE}
}
@inproceedings{ferreira2009securely,
  title={How to securely break into RBAC: the BTG-RBAC model},
  author={Ferreira, Ana and others},
  booktitle={Computer Security Applications Conference},
  pages={23--31},
  year={2009},
  organization={IEEE}
}
@inproceedings{twidle2008ponder2,
  title={Ponder2-a policy environment for autonomous pervasive systems},
  author={Twidle, Kevin and Lupu, Emil and Dulay, Naranker and Sloman, Morris},
  booktitle={Policies for Distributed Systems and Networks, 2008. POLICY 2008. IEEE Workshop on},
  pages={245--246},
  year={2008},
  organization={IEEE}
}
@article{maw2014survey,
  title={A survey of access control models in wireless sensor networks},
  author={Maw, Htoo Aung and others},
  journal={Journal of Sensor and Actuator Networks},
  volume={3},
  number={2},
  pages={150--180},
  year={2014},
  publisher={Multidisciplinary Digital Publishing Institute}
}
@article{yu2011fdac,
  title={FDAC: Toward fine-grained distributed data access control in wireless sensor networks},
  author={Yu, Shucheng and Ren, Kui and Lou, Wenjing},
  journal={IEEE Transactions on Parallel and Distributed Systems},
  volume={22},
  number={4},
  pages={673--686},
  year={2011},
  publisher={IEEE}
}
@inproceedings{garcia2010modular,
  title={Modular context-aware access control for medical sensor networks},
  author={Garcia-Morchon, Oscar and Wehrle, Klaus},
  booktitle={Proceedings of the 15th ACM symposium on Access control models and technologies},
  pages={129--138},
  year={2010},
  organization={ACM}
}
@inproceedings{maw2013adaptive,
  title={An adaptive access control model for medical data in wireless sensor networks},
  author={Maw, Htoo Aung and Xiao, Hannan and Christianson, Bruce},
  booktitle={e-Health Networking, Applications \& Services (Healthcom), 15th International Conference on},
  pages={303--309},
  year={2013},
  organization={IEEE}
}
@inproceedings{maw2012adaptive,
  title={An adaptive access control model with privileges overriding and behaviour monitoring in wireless sensor networks},
  author={Maw, Htoo Aung and Xiao, Hannan and Christianson, Bruce},
  booktitle={Proceedings of the 8h ACM symposium on QoS and security for wireless and mobile networks},
  pages={81--84},
  year={2012},
  organization={ACM}
}
@inproceedings{ferreira2006break,
  title={How to break access control in a controlled manner},
  author={Ferreira, Anna and Cruz-Correia, Ricardo and Antunes, Luis and Farinha, Pedro and Oliveira-Palhares, E and Chadwick, David W and Costa-Pereira, Altamiro},
  booktitle={Computer-Based Medical Systems, 19th IEEE International Symposium on},
  pages={847--854},
  year={2006},
  organization={IEEE}
}
@inproceedings{georgakakis2011spatio,
  title={Spatio temporal emergency role based access control (STEM-RBAC): A time and location aware role based access control model with a break the glass mechanism},
  author={Georgakakis, Emmanouil and others},
  booktitle={Computers and Communications},
  pages={764--770},
  year={2011},
  organization={IEEE}
}
@article{rezaeibagha2016distributed,
  title={Distributed clinical data sharing via dynamic access-control policy transformation},
  author={Rezaeibagha, Fatemeh and Mu, Yi},
  journal={International journal of medical informatics},
  volume={89},
  pages={25--31},
  year={2016},
  publisher={Elsevier}
}
@article{dong2014achieving,
  title={Achieving an effective, scalable and privacy-preserving data sharing service in cloud computing},
  author={Dong, Xin and Yu, Jiadi and Luo, Yuan and Chen, Yingying and Xue, Guangtao and Li, Minglu},
  journal={Computers \& security},
  volume={42},
  pages={151--164},
  year={2014},
  publisher={Elsevier}
}
@article{liu2015secure,
  title={Secure sharing of personal health records in cloud computing: ciphertext-policy attribute-based signcryption},
  author={Liu, Jianghua and Huang, Xinyi and Liu, Joseph K},
  journal={Future Generation Computer Systems},
  volume={52},
  pages={67--76},
  year={2015},
  publisher={Elsevier}
}
@article{maw2016btg,
  title={BTG-AC: break-the-glass access control model for medical data in wireless sensor networks},
  author={Maw, Htoo Aung and Xiao, Hannan and Christianson, Bruce and Malcolm, James A},
  journal={IEEE journal of biomedical and health informatics},
  volume={20},
  number={3},
  pages={763--774},
  year={2016},
  publisher={IEEE}
}
@inproceedings{ardagna2008regulating,
  title={Regulating exceptions in healthcare using policy spaces},
  author={Ardagna, Claudio Agostino and others},
  booktitle={IFIP Annual Conference on Data and Applications Security and Privacy},
  pages={254--267},
  year={2008},
  organization={Springer}
}
@article{gert2005emergencies,
  title={How are emergencies different from other medical situations?},
  author={Gert, Heather J},
  journal={Mount Sinai journal of medicine},
  volume={72},
  number={4},
  pages={216--220},
  year={2005},
  publisher={Baltimore: Mount Sinai Hospital, 1970-}
}
@inproceedings{gupta2006criticality,
  title={Criticality aware access control model for pervasive applications},
  author={Gupta, Sandeep KS and Mukherjee, Tridib and Venkatasubramanian, Krishna},
  booktitle={Pervasive Computing and Communications, 2006. PerCom 2006. Fourth Annual IEEE International Conference on},
  pages={5--pp},
  year={2006},
  organization={IEEE}
}
@inproceedings{han2006managing,
  title={Managing exceptions in the medical workflow systems},
  author={Han, Minmin and Thiery, Thomas and Song, Xiping},
  booktitle={Proceedings of the 28th international conference on Software engineering},
  pages={741--750},
  year={2006},
  organization={ACM}
}
@inproceedings{keppler2006redirection,
  title={Redirection policies for mission-based information sharing},
  author={Keppler, David and Swarup, Vipin and Jajodia, Sushil},
  booktitle={Proceedings of the eleventh ACM symposium on Access control models and technologies},
  pages={210--218},
  year={2006},
  organization={ACM}
}
@inproceedings{rostad2006study,
  title={A study of access control requirements for healthcare systems based on audit trails from access logs},
  author={Rostad, Lillian and Edsberg, Ole},
  booktitle={Computer Security Applications Conference, 2006. ACSAC'06. 22nd Annual},
  pages={175--186},
  year={2006},
  organization={IEEE}
}
@article{liu2016ts,
  title={Ts-RBAC: A RBAC model with transformation},
  author={Liu, Gang and Zhang, Runnan and Song, Huimin and Wang, Can and Liu, Jinhui and Liu, Aijun},
  journal={Computers \& Security},
  volume={60},
  pages={52--61},
  year={2016},
  publisher={Elsevier}
}
@inproceedings{brucker2009extending,
  title={Extending access control models with break-glass},
  author={Brucker, Achim D and Petritsch, Helmut},
  booktitle={Proceedings of the 14th ACM symposium on Access control models and technologies},
  pages={197--206},
  year={2009},
  organization={ACM}
}
@inproceedings{rissanen2004towards,
  title={Towards a mechanism for discretionary overriding of access control},
  author={Rissanen, Erik and Firozabadi, Babak Sadighi and Sergot, Marek},
  booktitle={International Workshop on Security Protocols},
  pages={312--319},
  year={2004},
  organization={Springer}
}
@inproceedings{georgakakis2011spatio,
  title={Spatio temporal emergency role based access control (STEM-RBAC): A time and location aware role based access control model with a break the glass mechanism},
  author={Georgakakis, Emmanouil and Nikolidakis, Stefanos A and Vergados, Dimitrios D and Douligeris, Christos},
  booktitle={Computers and Communications (ISCC), 2011 IEEE Symposium on},
  pages={764--770},
  year={2011},
  organization={IEEE}
}
@inproceedings{ferreira2009securely,
  title={How to securely break into RBAC: the BTG-RBAC model},
  author={Ferreira, Ana and Chadwick, David and Farinha, Pedro and Correia, Ricardo and Zao, Gansen and Chilro, Rui and Antunes, Luis},
  booktitle={Computer Security Applications Conference, 2009. ACSAC'09. Annual},
  pages={23--31},
  year={2009},
  organization={IEEE}
}
@inproceedings{schefer2013generic,
  title={Generic support for RBAC break-glass policies in process-aware information systems},
  author={Schefer-Wenzl, Sigrid and Strembeck, Mark},
  booktitle={Proceedings of the 28th Annual ACM Symposium on Applied Computing},
  pages={1441--1446},
  year={2013},
  organization={ACM}
}
@article{schefer2014model,
  title={Model-driven specification and enforcement of RBAC break-glass policies for process-aware information systems},
  author={Schefer-Wenzl, Sigrid and Strembeck, Mark},
  journal={Information and Software Technology},
  volume={56},
  number={10},
  pages={1289--1308},
  year={2014},
  publisher={Elsevier}
}
@inproceedings{grandison2007impact,
  title={The impact of industry constraints on model-driven data disclosure controls},
  author={Grandison, Tyrone and Davis, John},
  booktitle={Proc. of the 1st International Workshop on Model-Based Trustworthy Health Information Systems (MOTHIS)},
  year={2007}
}
@Comment{jabref-meta: databaseType:bibtex;}

gha_language: HTML


text:
@InProceedings{dubois13a,
  pdf = {http://jmlr.org/proceedings/papers/v31/dubois13a.pdf},
  title = {Stochastic blockmodeling of relational event dynamics},
  author = {DuBois, Christopher and Butts, Carter and Smyth, Padhraic},
  pages = {238--246},
  abstract = {Several approaches have recently been proposed for modeling of continuous-time network data via dyadic event rates conditioned on the observed history of events and nodal or dyadic covariates. In many cases, however, interaction propensities -- and even the underlying mechanisms of interaction -- vary systematically across subgroups whose identities are unobserved. For static networks such heterogeneity has been treated via methods such as stochastic blockmodeling, which operate by assuming latent groups of individuals with similar tendencies in their group-wise interactions. Here we combine ideas from stochastic blockmodeling and continuous-time network models by positing a latent partition of the node set such that event dynamics within and between subsets evolve in potentially distinct ways. We illustrate the use of our model family by application to several forms of dyadic interaction data, including email communication and Twitter direct messages. Parameter estimates from the fitted models clearly reveal heterogeneity in the dynamics among groups of individuals. We also find that the fitted models have better predictive accuracy than both baseline models and relational event models that lack latent structure. },
}

repository: mreid/papersite

repo_name: mreid/papersite

gha_license_id: MIT

gha_language: TeX


text:
// Original code from https://github.com/AlekSi/cgo-by-example
package main

import (
	"fmt"
	"unsafe"
)

/*
#include <stdlib.h>
#include "lib/lib.h"
#cgo LDFLAGS: -L . -l lib
*/
import "C"

func Random() int {
	return int(C.random())
}

func Seed(i int) {
	C.srandom(C.uint(i))
}

func F(i C.int) {
	fmt.Println("Go F()")
}

func main() {
	fmt.Println("Cgo random:", Random())

	C.f0()

	C.f1(5)

	var i int = 8
	C.f1(C.int(i))

	// Convert Go string to C string (char*) and back.
	cs := C.CString("Go string")
	csRet := C.f2(cs)
	fmt.Printf("fmt: %s\n", C.GoString(csRet))
	C.free(unsafe.Pointer(cs))
	//defer C.free(unsafe.Pointer(csRet))

	// Pass C struct to C function by value.
	s1 := C.struct_s1{a: 5} // or cast with C.int: s1 := C.struct_s1{C.int(i)}
	s1Ret := C.f31(s1)
	fmt.Printf("f31: s1=%v, s1Ret=%v\n", s1, s1Ret)

	// Pass C struct to C function by pointer.
	s1 = C.struct_s1{a: 5}
	s1Ret = *C.f32(&s1)
	fmt.Printf("f32: s1=%v, s1Ret=%v\n", s1, s1Ret)

	// Pass C struct with int pointer to C function.
	// s2 := C.struct_s2{&C.int(i)} - compile error "cannot take the address of _Ctype_int(i)", create variable as below
	ci := C.int(i)
	s2 := C.struct_s2{p: &ci}
	fmt.Printf("s2=%v, *s2.p=%d, i=%d\n", s2, *s2.p, i)
	C.f4(s2)
	fmt.Printf("f4: s2=%v, *s2.p=%d, i=%d\n", s2, *s2.p, i)

	// Pass C function pointer to C function.
	// C.f5(C.f1)                 - compile error "must call C.f1"
	// fp := unsafe.Pointer(C.f1) - compile error "must call C.f1"
	// It is not possible to pass C function pointer via Go.

	// Pass Go function pointer to C function.
	f := func(i C.int) {
		fmt.Println("Go f()")
	}
	fp := unsafe.Pointer(&f)
	// C.f5((*[0]byte)(fp)) - Compiles but explodes. Do not do this!

	// Pass global Go function pointer to C function.
	f = F
	fp = unsafe.Pointer(&f)
	// C.f5((*[0]byte)(fp)) - Compiles but explodes. Do not do this!
	// It is possible to call Go function from C. See main2.go for solution.

	_ = fp
}

repository: lnquy/go-training

repo_name: lnquy/go-training


text:
package exp

import (
	"reflect"
	"sort"

	"github.com/doug-martin/goqu/v7/internal/errors"
	"github.com/doug-martin/goqu/v7/internal/util"
)

type (
	insert struct {
		from       AppendableExpression
		cols       ColumnListExpression
		vals       [][]interface{}
		onConflict ConflictExpression
	}
)

func NewInsertExpression(rows ...interface{}) (insertExpression InsertExpression, err error) {
	switch len(rows) {
	case 0:
		return new(insert), nil
	case 1:
		val := reflect.ValueOf(rows[0])
		if val.Kind() == reflect.Slice {
			vals := make([]interface{}, val.Len())
			for i := 0; i < val.Len(); i++ {
				vals[i] = val.Index(i).Interface()
			}
			return NewInsertExpression(vals...)
		}
		if ae, ok := rows[0].(AppendableExpression); ok {
			return &insert{from: ae}, nil
		}

	}
	return newInsert(rows...)
}

func (i *insert) Expression() Expression {
	return i
}

func (i *insert) Clone() Expression {
	return i.clone()
}

func (i *insert) clone() *insert {
	return &insert{from: i.from, cols: i.cols, vals: i.vals, onConflict: i.onConflict}
}

func (i *insert) IsEmpty() bool {
	return i.from == nil && (i.cols == nil || i.cols.IsEmpty())
}

func (i *insert) IsInsertFrom() bool {
	return i.from != nil
}
func (i *insert) From() AppendableExpression {
	return i.from
}
func (i *insert) Cols() ColumnListExpression {
	return i.cols
}

func (i *insert) SetCols(cols ColumnListExpression) InsertExpression {
	ci := i.clone()
	ci.cols = cols
	return ci
}

func (i *insert) Vals() [][]interface{} {
	return i.vals
}

func (i *insert) SetVals(vals [][]interface{}) InsertExpression {
	ci := i.clone()
	ci.vals = vals
	return ci
}

func (i *insert) OnConflict() ConflictExpression {
	return i.onConflict
}

func (i *insert) SetOnConflict(ce ConflictExpression) InsertExpression {
	ci := i.clone()
	ci.onConflict = ce
	return ci
}

func (i *insert) DoNothing() InsertExpression {
	return i.SetOnConflict(NewDoNothingConflictExpression())

}
func (i *insert) DoUpdate(target string, update interface{}) InsertExpression {
	return i.SetOnConflict(NewDoUpdateConflictExpression(target, update))
}

// parses the rows gathering and sorting unique columns and values for each record
func newInsert(rows ...interface{}) (insertExp InsertExpression, err error) {
	var mapKeys util.ValueSlice
	rowValue := reflect.Indirect(reflect.ValueOf(rows[0]))
	rowType := rowValue.Type()
	rowKind := rowValue.Kind()
	vals := make([][]interface{}, len(rows))
	var columns ColumnListExpression
	for i, row := range rows {
		if rowType != reflect.Indirect(reflect.ValueOf(row)).Type() {
			return nil, errors.New(
				"rows must be all the same type expected %+v got %+v",
				rowType,
				reflect.Indirect(reflect.ValueOf(row)).Type(),
			)
		}
		newRowValue := reflect.Indirect(reflect.ValueOf(row))
		switch rowKind {
		case reflect.Map:
			if columns == nil {
				mapKeys = util.ValueSlice(newRowValue.MapKeys())
				sort.Sort(mapKeys)
				colKeys := make([]interface{}, len(mapKeys))
				for j, key := range mapKeys {
					colKeys[j] = key.Interface()
				}
				columns = NewColumnListExpression(colKeys...)
			}
			newMapKeys := util.ValueSlice(newRowValue.MapKeys())
			if len(newMapKeys) != len(mapKeys) {
				return nil, errors.New("rows with different value length expected %d got %d", len(mapKeys), len(newMapKeys))
			}
			if !mapKeys.Equal(newMapKeys) {
				return nil, errors.New("rows with different keys expected %s got %s", mapKeys.String(), newMapKeys.String())
			}
			rowVals := make([]interface{}, len(mapKeys))
			for j, key := range mapKeys {
				rowVals[j] = newRowValue.MapIndex(key).Interface()
			}
			vals[i] = rowVals
		case reflect.Struct:
			rowCols, rowVals, err := getFieldsValues(newRowValue)
			if err != nil {
				return nil, err
			}
			if columns == nil {
				columns = NewColumnListExpression(rowCols...)
			}
			vals[i] = rowVals
		default:
			return nil, errors.New(
				"unsupported insert must be map, goqu.Record, or struct type got: %T",
				row,
			)
		}
	}
	return &insert{cols: columns, vals: vals}, nil
}

func getFieldsValues(value reflect.Value) (rowCols, rowVals []interface{}, err error) {
	if value.IsValid() {
		cm, err := util.GetColumnMap(value.Interface())
		if err != nil {
			return rowCols, rowVals, err
		}
		cols := cm.Cols()
		for _, col := range cols {
			f := cm[col]
			if f.ShouldInsert {
				v := value.FieldByIndex(f.FieldIndex)
				rowCols = append(rowCols, col)
				rowVals = append(rowVals, v.Interface())
			}
		}
	}
	return rowCols, rowVals, nil
}

repository: opsfarmer/goqu

repo_name: opsfarmer/goqu


text:
package processlist

import (
	"bytes"
	"compress/zlib"
	"context"
	"encoding/base64"
	"errors"
	"fmt"
	"math"
	"strconv"
	"strings"
	"time"

	"github.com/signalfx/golib/v3/event"
	log "github.com/sirupsen/logrus"

	"github.com/signalfx/signalfx-agent/pkg/core/config"
	"github.com/signalfx/signalfx-agent/pkg/monitors"
	"github.com/signalfx/signalfx-agent/pkg/monitors/types"
	"github.com/signalfx/signalfx-agent/pkg/utils"
)

const version = "0.0.30"

// EVENT(objects.top-info): Process list event.

var zlibCompressor = zlib.NewWriter(&bytes.Buffer{})
var now = time.Now

// Config for this monitor
type Config struct {
	config.MonitorConfig `yaml:",inline" singleInstance:"true" acceptsEndpoints:"false"`
}

func init() {
	monitors.Register(&monitorMetadata, func() interface{} {
		return &Monitor{}
	}, &Config{})
}

// compresses the given byte array
func compressBytes(in []byte) (buf bytes.Buffer, err error) {
	zlibCompressor.Reset(&buf)
	_, err = zlibCompressor.Write(in)
	_ = zlibCompressor.Close()
	return
}

// Monitor for Utilization
type Monitor struct {
	Output        types.Output
	cancel        func()
	lastCPUCounts map[procKey]time.Duration
	nextPurge     time.Time
	logger        log.FieldLogger
}

// TopProcess is a platform-independent way of representing a process to be
// reported to SignalFx
type TopProcess struct {
	ProcessID           int
	CreatedTime         time.Time
	Username            string
	Priority            int
	Nice                *int
	VirtualMemoryBytes  uint64
	WorkingSetSizeBytes uint64
	SharedMemBytes      uint64
	Status              string
	MemPercent          float64
	TotalCPUTime        time.Duration
	Command             string
}

type procKey string

// Key used to uniquely identify a process, even if pid is reused.
func (tp *TopProcess) key() procKey {
	return procKey(fmt.Sprintf("%d|%s", tp.ProcessID, tp.Command))
}

// Configure configures the monitor and starts collecting on the configured interval
func (m *Monitor) Configure(conf *Config) error {
	m.logger = log.WithFields(log.Fields{"monitorType": monitorType, "monitorID": conf.MonitorID})
	// create contexts for managing the plugin loop
	var ctx context.Context
	ctx, m.cancel = context.WithCancel(context.Background())
	interval := time.Duration(conf.IntervalSeconds) * time.Second

	m.lastCPUCounts = make(map[procKey]time.Duration)

	osCache := initOSCache()
	m.nextPurge = now().Add(3 * time.Minute)

	utils.RunOnInterval(
		ctx,
		func() {
			// get the process list
			procs, err := ProcessList(conf, osCache, m.logger)
			if err != nil {
				m.logger.WithError(err).Error("Couldn't get process list")
				return
			}

			message, err := m.encodeEventMessage(procs, interval)
			if err != nil {
				m.logger.WithError(err).Error("Failed to encode process list")
			}

			m.Output.SendEvent(
				&event.Event{
					EventType:  "objects.top-info",
					Category:   event.AGENT,
					Dimensions: map[string]string{},
					Properties: map[string]interface{}{
						"message": message,
					},
					Timestamp: time.Now(),
				},
			)

			curTime := now()
			if curTime.After(m.nextPurge) {
				m.purgeCPUCache(procs)
				m.nextPurge = curTime.Add(3 * time.Minute)
			}
		},
		interval,
	)
	return nil
}

func (m *Monitor) encodeEventMessage(procs []*TopProcess, sampleInterval time.Duration) (string, error) {
	if len(procs) == 0 {
		return "", errors.New("no processes to encode")
	}

	procsEncoded := []byte{'{'}
	for i := range procs {
		procsEncoded = append(procsEncoded, []byte(m.encodeProcess(procs[i], sampleInterval)+",")...)
	}
	procsEncoded[len(procsEncoded)-1] = '}'

	// escape and compress the process list
	escapedBytes := bytes.Replace(procsEncoded, []byte{byte('\\')}, []byte{byte('\\'), byte('\\')}, -1)
	compressedBytes, err := compressBytes(escapedBytes)
	if err != nil {
		return "", fmt.Errorf("couldn't compress process list: %v", err)
	}

	return fmt.Sprintf(
		"{\"t\":\"%s\",\"v\":\"%s\"}",
		base64.StdEncoding.EncodeToString(compressedBytes.Bytes()), version), nil
}

func (m *Monitor) encodeProcess(proc *TopProcess, sampleInterval time.Duration) string {
	key := proc.key()
	lastSampleInterval := sampleInterval
	lastCPUCount, ok := m.lastCPUCounts[key]
	if !ok {
		lastSampleInterval = time.Since(proc.CreatedTime)
	}
	m.lastCPUCounts[key] = proc.TotalCPUTime

	cpuPercent := float64(proc.TotalCPUTime-lastCPUCount) * 100.0 / float64(lastSampleInterval)

	nice := ""
	if proc.Nice == nil {
		nice = "unknown"
	} else {
		nice = strconv.Itoa(*proc.Nice)
	}

	return fmt.Sprintf(`"%d":["%s",%d,"%s",%d,%d,%d,"%s",%.2f,%.2f,"%s","%s"]`,
		proc.ProcessID,
		strings.ReplaceAll(proc.Username, `"`, "'"),
		proc.Priority,
		nice,
		proc.VirtualMemoryBytes/1024,
		proc.WorkingSetSizeBytes/1024,
		proc.SharedMemBytes/1024,
		proc.Status,
		cpuPercent,
		proc.MemPercent,
		toTime(proc.TotalCPUTime.Seconds()),
		strings.ReplaceAll(proc.Command, `"`, `'`),
	)
}

func (m *Monitor) purgeCPUCache(lastProcs []*TopProcess) {
	lastKeys := make(map[procKey]struct{}, len(lastProcs))
	for i := range lastProcs {
		lastKeys[lastProcs[i].key()] = struct{}{}
	}

	for k := range m.lastCPUCounts {
		if _, ok := lastKeys[k]; !ok {
			delete(m.lastCPUCounts, k)
		}
	}
}

// toTime returns the given seconds as a formatted string "min:sec.dec"
func toTime(secs float64) string {
	minutes := int(secs) / 60
	seconds := math.Mod(secs, 60.0)
	dec := math.Mod(seconds, 1.0) * 100
	return fmt.Sprintf("%02d:%02.f.%02.f", minutes, seconds, dec)
}

// Shutdown stops the metric sync
func (m *Monitor) Shutdown() {
	if m.cancel != nil {
		m.cancel()
	}
}

repository: signalfx/signalfx-agent

repo_name: signalfx/signalfx-agent

branch_name: refs/heads/main

gha_language: Go


text:
@Article{ipython:2007,
 Author    = {P\'erez, Fernando and Granger, Brian E.},
 Title     = {{IP}ython: a System for Interactive Scientific Computing},
 Journal   = {Computing in Science and Engineering},
 Volume    = {9},
 Number    = {3},
 Pages     = {21--29},
 month     = may,
 year      = 2007,
 url       = "https://ipython.org",
 ISSN      = "1521-9615",
 doi       = {10.1109/MCSE.2007.53},
 publisher = {IEEE Computer Society} }

repository: griffin-h/makecite

repo_name: griffin-h/makecite


text:
package server_test

import (
	"testing"

	"github.com/ritsource/mini-db/server"
	"github.com/ritsource/mini-db/src"
)

func handleErr(t *testing.T, err error) {
	if err != nil {
		t.Error(err)
	}
}

func TestHandleMsg(t *testing.T) {
	store := src.Store{Persist: false}
	store.Map = make(map[string]interface{})

	// Testing SET-Command hanlding
	bs1 := server.HandleMsg(&store, []byte("SET\r\nkey1\r\n+OK\r\n"))
	d1, err := src.UnmarshalData(bs1)
	handleErr(t, err)

	if d1["error"] != nil {
		t.Error("d1[\"error\"] != nil")
	}

	// Testing GET-Command hanlding
	bs2 := server.HandleMsg(&store, []byte("GET\r\nkey1\r\n"))
	d2, err := src.UnmarshalData(bs2)
	handleErr(t, err)

	if d2["error"] != nil {
		t.Error("d2[\"error\"] != nil")
	} else if d2["data"] != "OK" {
		t.Error("d2[\"data\"] != \"OK\"")
	}

	// Testing DELETE-Command
	bs3 := server.HandleMsg(&store, []byte("DELETE\r\nkey1\r\n"))
	d3, err := src.UnmarshalData(bs3)
	handleErr(t, err)

	if d3["error"] != nil {
		t.Error("d3[\"error\"] != nil")
	}

	// Testing SET-Cmd for non existing key
	bs4 := server.HandleMsg(&store, []byte("GET\r\nkey1\r\n"))
	d4, err := src.UnmarshalData(bs4)
	handleErr(t, err)

	if d4["error"] == nil {
		t.Error("d4[\"error\"] == nil", d4["error"], "or unable to delete file")
	}

	// Testing SET-Command where value contains string
	bs5 := server.HandleMsg(&store, []byte("SET\r\nkey1\r\n+Ritwik\r\n+Saha\r\n"))
	d5, err := src.UnmarshalData(bs5)
	handleErr(t, err)

	if d5["error"] != nil {
		t.Error("d1[\"error\"] != nil")
	}
}

repository: ritsource/mini-db

repo_name: ritsource/mini-db


text:
// moderngpu copyright (c) 2016, Sean Baxter http://www.moderngpu.com
#pragma once
#include "kernel_sortedsearch.hxx"
#include "kernel_scan.hxx"
#include "kernel_load_balance.hxx"

BEGIN_MGPU_NAMESPACE

template<typename launch_arg_t = empty_t,
  typename a_it, typename b_it, typename comp_t>
mem_t<int2> inner_join(a_it a, int a_count, b_it b, int b_count,
  comp_t comp, context_t& context) {

  // Compute lower bounds of a into b.
  mem_t<int> lower(a_count, context);
  sorted_search<bounds_lower, launch_arg_t>(a, a_count, b, b_count,
    lower.data(), comp, context);

  // Compute upper bounds of a into b. Emit the difference upper-lower, which
  // is the number of matches for each element of a into b.
  mem_t<int> segments(a_count, context);
  transform_search<bounds_upper, launch_arg_t>(
    []MGPU_DEVICE(int needle, int haystack, const int* lower, int* matches) {
      matches[needle] = haystack - lower[needle];
    }, a, a_count, b, b_count, comp, context, lower.data(), segments.data()
  );

  // Scan the matches into a segments descriptor array.
  mem_t<int> join_count(1, context, memory_space_host);
  scan_event(segments.data(), a_count, segments.data(), plus_t<int>(),
    join_count.data(), context, context.event());

  // Allocate space for the join.
  cudaEventSynchronize(context.event());
  int count = join_count.data()[0];
  mem_t<int2> output(count, context);

  // Use load-balancing search on the segments. The output is a pair with
  // a_index = seg and b_index = lower[seg] + rank.
  transform_lbs<launch_arg_t>(
    []MGPU_DEVICE(
      int index, int seg, int rank,
      tuple<int> lower, int2* output
    ) {
      output[index] = make_int2(seg, get<0>(lower) + rank);
    }, count, segments.data(), a_count,
    make_tuple(lower.data()), context, output.data()
  );

  return output;
}

END_MGPU_NAMESPACE

repository: seanbaxter/moderngpu

repo_name: seanbaxter/moderngpu

extension: hxx


text:
DESCRIPTION = "syzkaller is an unsupervised coverage-guided kernel fuzzer"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://src/${GO_IMPORT}/LICENSE;md5=5335066555b14d832335aa4660d6c376"

inherit go-mod

GO_IMPORT = "github.com/google/syzkaller"

SRC_URI = "git://${GO_IMPORT};protocol=https;destsuffix=${BPN}-${PV}/src/${GO_IMPORT};branch=master \
           file://0001-sys-targets-targets.go-allow-users-to-override-hardc.patch;patchdir=src/${GO_IMPORT} \
           file://0001-executor-Include-missing-linux-falloc.h.patch;patchdir=src/${GO_IMPORT} \
           "
SRCREV = "6d01f20890edf11b99bb54573025b11c1acd2d52"

COMPATIBLE_HOST = "(x86_64|i.86|arm|aarch64).*-linux"

B = "${S}/src/${GO_IMPORT}/bin"

GO_EXTRA_LDFLAGS += ' -X ${GO_IMPORT}/prog.GitRevision=${SRCREV}'

export GOHOSTFLAGS="${GO_LINKSHARED} ${GOBUILDFLAGS}"
export GOTARGETFLAGS="${GO_LINKSHARED} ${GOBUILDFLAGS}"
export TARGETOS = '${GOOS}'
export TARGETARCH = '${GOARCH}'
export TARGETVMARCH = '${GOARCH}'

CGO_ENABLED = "1"

DEPENDS:class-native += "qemu-system-native"

do_compile:class-native() {
    export HOSTOS="${GOHOSTOS}"
    export HOSTARCH="${GOHOSTARCH}"

    oe_runmake HOSTGO="${GO}" host
}

do_compile:class-target() {
    export HOSTOS="${GOOS}"
    export HOSTARCH="${GOARCH}"
    export SYZ_CC_${TARGETOS}_${TARGETARCH}="${CC}"

    # Unset GOOS and GOARCH so that the correct syz-sysgen binary can be
    # generated. Fixes:
    # go install: cannot install cross-compiled binaries when GOBIN is set
    unset GOOS
    unset GOARCH

    oe_runmake GO="${GO}" CC="${CXX}" CFLAGS="${CXXFLAGS} ${LDFLAGS}" REV=${SRCREV} target
}

do_install:class-native() {
    SYZ_BINS_NATIVE="syz-manager syz-runtest syz-repro syz-mutate syz-prog2c \
                     syz-db syz-upgrade"

    install -d ${D}${bindir}

    for i in ${SYZ_BINS_NATIVE}; do
        install -m 0755 ${B}/${i} ${D}${bindir}
    done
}

do_install:class-target() {
    SYZ_TARGET_DIR="${TARGETOS}_${TARGETARCH}"
    SYZ_BINS_TARGET="syz-fuzzer syz-execprog syz-stress syz-executor"

    install -d ${D}${bindir}/${SYZ_TARGET_DIR}

    for i in ${SYZ_BINS_TARGET}; do
        install -m 0755 ${B}/${SYZ_TARGET_DIR}/${i} ${D}${bindir}/${SYZ_TARGET_DIR}
    done
}

BBCLASSEXTEND += "native"

repository: openembedded/meta-openembedded

repo_name: openembedded/meta-openembedded

gha_language: BitBake


text:
@InProceedings{tank15,
  supplementary = {Supplementary:tank15-supp.pdf},
  title = {{Streaming Variational Inference for Bayesian Nonparametric Mixture Models}},
  author = {Tank, Alex and Foti, Nicholas and Fox, Emily},
  pages = {968-976},
  abstract = {In theory, Bayesian nonparametric (BNP) models are well suited to streaming data scenarios due to their ability to adapt model complexity based on the amount of data observed. Unfortunately, such benefits have not been fully realized in practice; existing inference algorithms either are not applicable to streaming applications or are not extensible to nonparametric models.  For the special case of Dirichlet processes, streaming inference has been considered.  However, there is growing interest in more flexible BNP models, in particular building on the class of normalized random measures (NRMs).  We work within this general framework and present a streaming variational inference algorithm for NRM mixture models based on assumed density filtering.  Extensions to expectation propagation algorithms are possible in the batch data setting.  We demonstrate the efficacy of the algorithm on clustering documents in large, streaming text corpora.},
}


text:
BASEPV = "4.9"
PV = "linaro-${BASEPV}"
require recipes-devtools/gcc/gcc-cross_${PV}.bb
require recipes-devtools/gcc/gcc-cross-initial.inc

repository: liyaoshi/meta-linaro

repo_name: liyaoshi/meta-linaro


text:
DESCRIPTION = "PetaLinux python module packages"

inherit packagegroup

# Packages
PYTHON_MODULES = " \
	python3-pip\
	python3-multiprocessing \
	python3-numpy \
	python3-shell \
	python3-threading \
	python3-threading \
	python3-pyserial \
	python3-h5py \
	"

RDEPENDS_${PN} = "${PYTHON_MODULES}"

repository: fullstackfpga/meta-petalinux

repo_name: fullstackfpga/meta-petalinux